Compare commits

...

136 Commits

Author SHA1 Message Date
jenkinsopenvidu 65f6725b6e Update installation scripts to 2.32.1 2025-12-09 14:00:20 +00:00
jenkinsopenvidu 88bf128d5f Update to version 2.32.1 2025-12-09 13:59:08 +00:00
jenkinsopenvidu 4efd901c2f Update docker-compose.yml files to version 2.32.1 2025-12-09 13:45:32 +00:00
jenkinsopenvidu 39e8c21b94 Update openvidu-recording to version 2.32.1 2025-12-09 13:31:07 +00:00
jenkinsopenvidu 9faad0720f Update openvidu-java-client to version 2.32.1 2025-12-09 13:23:48 +00:00
jenkinsopenvidu f123e3cbb2 Update openvidu-node-client to version 2.32.1 2025-12-09 13:21:29 +00:00
pabloFuente 5921eef20a openvidu-server: fix multiple CVEs in dependencies
- Jackson (CVE-2025-52999, PRISMA-2023-0067): upgraded `jackson-core` and `jackson-databind` from `2.14.0` to `2.19.2`
- Apache HttpClient (CVE-2020-13956): upgraded `httpclient` from `4.5.12` to `4.5.14`.
- Netty (CVE-2025-58057, CVE-2025-58056): upgraded `netty-codec-http` and `netty-codec-compression` from `4.2.4.Final` to `4.2.7.Final`.
2025-12-09 12:45:19 +01:00
cruizba da7f92d707 openvidu-deployment: Minor fixes openvidu ha on premises. 2025-12-06 21:07:02 +01:00
cruizba 4eef1cb18b openvidu-deployment: HA - Update health check configuration for OpenVidu Master Nodes 2025-12-06 19:15:52 +01:00
jenkinsopenvidu 490cbc1c16 Update installation scripts for next release 2025-12-04 21:43:56 +00:00
jenkinsopenvidu d835f86577 Update to version 2.32.0 2025-12-04 21:41:34 +00:00
jenkinsopenvidu cf5d8a14a0 Update docker-compose.yml files to version 2.32.0 2025-12-04 21:33:06 +00:00
jenkinsopenvidu f7ba36aebb Update openvidu-recording to version 2.32.0 2025-12-04 21:27:56 +00:00
jenkinsopenvidu 82cbd691c1 Update openvidu-java-client to version 2.32.0 2025-12-04 21:22:49 +00:00
cruizba 360c437de7 Add flatten-maven-plugin configuration for maven central publishing 2025-12-04 22:17:57 +01:00
cruizba 35bad7952d openvidu-java-client: Exclude specific artifacts from publishing in Maven configuration 2025-12-04 21:30:20 +01:00
cruizba f5397848c1 Typo in pom version 2025-12-04 21:04:43 +01:00
cruizba 97a3b200d8 openvidu-java-client: Update Maven plugins for central publishing sonatype: https://central.sonatype.org/news/20250326_ossrh_sunset/ 2025-12-04 20:55:39 +01:00
jenkinsopenvidu 4ab9797c82 Update openvidu-node-client to version 2.32.0 2025-12-04 19:03:10 +00:00
cruizba 10549ca631 openvidu-deployment: HA - Fix environment variable name for AWS region in OpenVidu server deployment script 2025-12-04 18:29:22 +01:00
cruizba e22de69094 openvidu-deployment: Add OPENVIDU_PRO_AWS_S3_REGION configuration to environment setup to openvidu-server 2025-12-04 17:01:17 +01:00
cruizba 79872ca288 openvidu-deployment: Add COTURN_INTERNAL_RELAY configuration to route TURN traffic through internal network 2025-12-04 16:13:19 +01:00
cruizba dc8626fbf4 openvidu-deployment: Fix HTTP status check in deployment scripts to wait for 401 instead of 200 2025-12-04 13:57:30 +01:00
cruizba 812677da8e openvidu-deployment: Increase EBS volume size to 15 GB in CloudFormation template 2025-12-03 13:26:12 +01:00
pabloFuente e3050f35ea Update Kurento to 7.3.0 2025-12-02 11:22:19 +01:00
pabloFuente aa54c5e0e4 Update Kurento to 7.3.0 in pom.xml 2025-12-02 10:46:44 +01:00
pabloFuente b4b61f660a openvidu-test-e2e: increase wait time for automatic STT unloading 2025-12-01 15:02:48 +01:00
pabloFuente b7e7a0dda3 openvidu-test-e2e: reduce flakyness of test with CopyOnWriteArrayList 2025-11-20 16:59:16 +01:00
pabloFuente dbb0bf782b Update package-lock.json 2025-11-20 11:47:35 +01:00
pabloFuente 51cf1bcbc6 openvidu-server: fix ForkJoinPool not being autoclosable now 2025-11-20 11:45:21 +01:00
pabloFuente 76ecaf44ff Deployments: add ulimits "nofile" property to all docker-compose.yml files 2025-11-20 11:32:03 +01:00
pabloFuente 316f938e4a Update container Java versions to Java 25 2025-11-20 11:13:12 +01:00
pabloFuente 8bff08d39f Update Java versions
- Require Java 25 to build
- Require Java 17 to use
2025-11-20 11:06:39 +01:00
pabloFuente 8cd7c6f06a Update ulimit value when running kurento-media-server as a Docker container 2025-11-20 10:24:46 +01:00
pabloFuente 9f13d2b4f2 Add --ulimit core=-1 flag to all hardcoded "docker run" comands for KMS 2025-11-19 19:43:49 +01:00
pabloFuente f70a7dc48f openvidu-server dashboard: update dependencies 2025-11-19 18:09:57 +01:00
pabloFuente ab97b4b4ef openvidu-browser: fix type import issue 2025-11-19 17:47:09 +01:00
pabloFuente 390fdc4870 openvidu-node-client: update dependencies 2025-11-19 17:46:48 +01:00
pabloFuente 5cf0cf0e11 openvidu-browser: update dependencies 2025-11-19 14:22:45 +01:00
pabloFuente a14cd70b09 openvidu-server: added maven-dependency-plugin 2025-11-17 14:59:39 +01:00
cruizba 4a805bd197 ci-scripts: missing env init in ci-scripts/build.sh 2025-11-16 20:55:59 +01:00
cruizba ec41f1748b ci-scripts: Allow build to use specific kurento java commit 2025-11-16 20:16:13 +01:00
pabloFuente e89771cb0d openvidu-test-e2e: added info log in STT memory leak test 2025-11-15 12:04:08 +01:00
pabloFuente d55845ab91 openvidu-test-e2e: fix broken virtual background image links 2025-11-14 20:29:50 +01:00
pabloFuente b1207a9f1a openvidu-test-e2e: store virtual background colors for testing 2025-11-14 20:27:29 +01:00
pabloFuente c9703a49b0 openvidui-test-e2e: make test compatible for mediasoup config 2025-11-14 17:26:21 +01:00
pabloFuente c06097d101 openvidu-server: updated logback configuration to remove warnings 2025-11-14 13:07:40 +01:00
pabloFuente 9b575bf778 openvidu-server: capture spring initialization error and better inform of port issues 2025-11-14 13:00:13 +01:00
pabloFuente 9bbe7787c7 Fix version of RTMP nginx container 2025-11-14 11:58:25 +01:00
pabloFuente a80a688f3c Update testcontainers to 2.0.2 (compatible with Docker 2.29) 2025-11-14 00:03:57 +01:00
pabloFuente 216d0e399f openvidu-test-e2e: add e2e test for individual recordings abruptly stopped 2025-11-13 20:38:03 +01:00
pabloFuente 46050c40b4 openvidu-server: fix getContainerIp for Docker > 2.29 2025-11-12 19:00:27 +01:00
cruizba 0d728f71d0 openvidu-deployment: Update runtime to Python 3.13 of lambdas and upgrade Docker images 2025-11-12 17:24:46 +01:00
cruizba 98880f6405 openvidu-deployment: Increase volume size from 12 to 15 GB in OpenVidu PRO AMI 2025-11-12 12:55:25 +01:00
pabloFuente 437c8446f1 openvidu-test-e2e: improve flaky tests 2025-11-11 19:54:57 +01:00
pabloFuente aeac86b3c0 Added configuration to fail upon warnings in maven-compile-plugin 2025-11-11 19:14:45 +01:00
pabloFuente a8fe54fa6c Fix all deprecations and warnings from tests 2025-11-11 19:14:10 +01:00
pabloFuente bf56fe02a7 openvidu-server: fix deprecations and remove warnings 2025-11-11 18:46:16 +01:00
pabloFuente 4c4bf277e2 openvidu-java-client: fix expected error test 2025-11-11 18:14:21 +01:00
pabloFuente 6d438fb61a openvidu-java-client: update deprecations and fix build warnings 2025-11-11 18:01:30 +01:00
pabloFuente 8772efaf46 Remove warnings for duplicated classes when building with Maven 2025-11-11 16:53:04 +01:00
pabloFuente 3353cd14e5 openvidu-server: remove deprecations and warnings 2025-11-11 16:37:11 +01:00
pabloFuente 3b35a8b264 ci-scripts: update the use of specific kurento java commit to set up local .m2 version 2025-11-11 13:34:41 +01:00
pabloFuente 1aabf62f34 openvidu-server: update all Dockerfiles for Java 21 2025-11-11 12:29:08 +01:00
pabloFuente 03c8b6e57f ci-scripts: remove wrong popd 2025-11-11 11:49:00 +01:00
pabloFuente d320dd590d ci-scripts: update Maven home settings.xml config 2025-11-11 11:41:48 +01:00
pabloFuente 7207a1591c Upgrade kurento-media-server Docker image from 7.1.1 to 7.2.0 2025-11-11 11:36:30 +01:00
pabloFuente 4776336629 ci-scripts: symlink maven settings.xml 2025-11-11 11:05:06 +01:00
pabloFuente 69b940bf0e Modernize openvidu-test-e2e Docker images. Update to Maven 3.9.x 2025-11-10 20:55:54 +01:00
pabloFuente 4f074f7633 Updated all Maven dependencies to latest 2025-11-10 20:12:48 +01:00
pabloFuente 605cee8bae Moved new integration tests 2025-11-08 21:58:01 +01:00
pabloFuente 71265ffec9 Extended integration tests with security path tests 2025-11-08 21:37:03 +01:00
pabloFuente 36d1f3bd5b New updated version of SecurityConfig 2025-11-08 19:17:49 +01:00
pabloFuente 6425eb8244 openvidu-test-browsers: simpler track availability check 2025-11-08 18:20:23 +01:00
pabloFuente 94c362f96f Android test wait 2025-11-08 02:21:38 +01:00
pabloFuente 770ffaeed6 openvidu-test-e2e: fix test wait 2025-11-07 22:55:16 +01:00
pabloFuente 7ad39d423d openvidu-test-browsers: simpler methods to check audio and video tracks 2025-11-07 21:30:38 +01:00
pabloFuente c5ba1f770c openvidu-test-browsers: newly updated Driver users 2025-11-07 20:32:11 +01:00
pabloFuente 79e2385358 openvidu-test-e2e: print android device status 2025-11-06 11:44:44 +01:00
pabloFuente afdbe9e236 openvidu-test-e2e: print container logs on start exception 2025-11-06 11:31:34 +01:00
pabloFuente 3671904a97 Update elasticsearch, kibana, metricbeat and filebeat versions 2025-11-05 18:40:59 +01:00
pabloFuente ddd42414ea Update ci-scripts 2025-11-05 16:17:25 +01:00
pabloFuente c7892b3d70 openvidu-test-e2e: revert change in endReason test 2025-11-05 15:56:54 +01:00
pabloFuente 6315acafb3 openvidu-e2e-e2e: update PRO tests 2025-11-04 19:13:52 +01:00
pabloFuente a9ad482c0b openvidu-server: replace deprecated @SpyBean with @MockitoSpyBean 2025-11-04 16:52:33 +01:00
pabloFuente f120e6a70c openvidu-server: migrate PowerMockito to Mockito 2025-11-04 16:46:19 +01:00
pabloFuente 20630c0553 openvidu-server: make some methods public for easier testing in PRO 2025-11-04 14:16:16 +01:00
pabloFuente a002e766ca openvidu-server: fix missing recordingStatusChanged failed event 2025-11-03 22:45:05 +01:00
pabloFuente ffd232b428 openvidu-server: accept HEAD method to public URL endpoints 2025-11-03 18:43:36 +01:00
pabloFuente a81d3f7c26 openvidu-server: new fix for SecurityConfig paths 2025-11-03 15:10:31 +01:00
pabloFuente 146aa315fc openvidu-test-e2e: fix broken tests 2025-11-03 14:12:20 +01:00
pabloFuente d330a8ef72 openvidu-server: updated SecurityConfig precedence and OPTIONS method 2025-11-03 13:47:19 +01:00
pabloFuente f8032b7b10 openvidu-test-e2e: change 405 to 403 when REST method doesn't exist 2025-11-03 13:32:56 +01:00
pabloFuente 9a522af1bc openvidu-server: proper CORS configuration 2025-11-03 13:14:11 +01:00
pabloFuente 67b6aa7158 openvidu-server: fix SecurityConfig path precedence 2025-11-03 12:59:29 +01:00
pabloFuente 2eda703c3a openvidu-e2e-tests.sh: remove unnecessary basic auth from curl wait command 2025-11-03 12:22:05 +01:00
pabloFuente 564124fd93 openvidu-test-e2e.sh: fix curl wait command 2025-11-03 12:00:27 +01:00
pabloFuente c249a63662 Update kurento version to 7.2.1-SNAPSHOT 2025-11-02 19:18:32 +01:00
pabloFuente 9de6f3ddeb Update openvidu-test-e2e Dockerfile to use Java 21 2025-11-02 18:37:51 +01:00
pabloFuente a7036993ff openvidu-ce-test.yml: update actions/upload-artifact version 2025-11-02 18:15:17 +01:00
pabloFuente 1b4e3f29d8 openvidu-server: update SecurityConfig.java to be reused 2025-11-02 17:50:03 +01:00
pabloFuente 0f22d6310d openvidu-server: exclude transitive dependency and update logback config 2025-11-02 16:12:11 +01:00
pabloFuente 49f808ee61 Allow WS connections in SecurityConfig 2025-11-01 20:47:20 +01:00
pabloFuente ffe36855bb Upgrade to Spring Boot 3.4.0 and Java 21 with comprehensive dependency updates
BREAKING CHANGES:
- Upgrade Java 11 → 21 (LTS)
- Upgrade Spring Boot 2.7.18 → 3.4.0 (requires Spring Framework 6.2.0)
- Migrate from javax.* → jakarta.* namespace (Jakarta EE 9+)
- Migrate Spring Security to 6.x with SecurityFilterChain pattern

Core Framework Upgrades:
- Spring Boot: 2.7.18 → 3.4.0
- Java Runtime: 11 → 21
- Kurento: 7.1.0 → 7.2.1-LOCAL
- SLF4J: 1.7.36 → 2.0.16 (managed by Spring Boot)
- Logback: 1.2.13 → 1.5.12
- Jackson: 2.13.5 → 2.18.1
- Gson: 2.10.1 → 2.11.0

Testing Framework Upgrades:
- JUnit: 5.9.1 → 5.11.4
- Mockito: 4.9.0 → 5.14.2
- Selenium: 4.12.1 → 4.26.0
- Testcontainers: 1.17.6 → 1.20.4
- Appium Java Client: 8.3.0 → 9.3.0

Infrastructure & Build Tool Upgrades:
- docker-java: 3.4.1 → 3.6.0
- Janino: 3.1.9 → 3.1.12
- Apache HttpClient5: 5.1.4 → 5.4.1
- commons-validator: confirmed at 1.9.0 (latest available)
- Maven Artifact: 3.8.6 → 3.9.9

Maven Plugin Upgrades:
- maven-compiler-plugin: 3.10.1 → 3.13.0
- maven-enforcer-plugin: 3.1.0 → 3.5.0
- maven-source-plugin: 3.2.1 → 3.3.1
- maven-assembly-plugin: 3.3.0 → 3.7.1
- maven-surefire-plugin: 3.0.0-M7 → 3.5.2
- maven-gpg-plugin: 1.6 → 3.2.7
- nexus-staging-maven-plugin: 1.6.13 → 1.7.0
- exec-maven-plugin: 3.1.0 → 3.5.0
- maven-javadoc-plugin: 3.4.1 → 3.11.1
- extra-enforcer-rules: 1.6.1 → 1.8.0

Migration Changes (javax → jakarta):
- javax.servlet.* → jakarta.servlet.*
- javax.annotation.* → jakarta.annotation.*
- All filter, servlet, and HTTP session classes migrated

Spring Security 6.x Migration:
- Replaced WebSecurityConfigurerAdapter with SecurityFilterChain beans
- Updated antMatchers() → requestMatchers()
- Updated cors().and().csrf() → lambda-based configuration
- Removed deprecated security patterns in favor of functional style

API Breaking Changes Fixed:
- Selenium 4.26.0: Replaced setHeadless(true) with addArguments("--headless=new")
  for Chrome/Edge and addArguments("--headless") for Firefox
- Appium 9.3.0: Removed deprecated MobileCapabilityType and MobilePlatform,
  replaced with string literals ("platformName", "Android")
- Spring HttpMethod: Updated enum comparison to use .equals() instead of switch

Dependency Management:
- Removed all SLF4J exclusions after Kurento 7.2.1-LOCAL and docker-java 3.6.0 upgrades
- Both dependencies now provide compatible SLF4J versions
- Simplified dependency tree with minimal exclusions

Test Fixes:
- WebhookIntegrationTest: Removed PowerMock timing assertions (unreliable with
  Spring Boot 3.4.0), simplified to focus on RPC independence and event ordering
- All 15 tests passing (13 unit tests + 2 integration tests)

Build Verification:
- All 6 Maven modules compile successfully
- openvidu-parent, openvidu-client, openvidu-java-client, openvidu-test-browsers,
  openvidu-server, openvidu-test-e2e
- Total build time: ~16 seconds
- All tests passing: 15/15

Files Modified:
- pom.xml (root): Version properties and Maven plugins
- openvidu-server/pom.xml: Removed SLF4J exclusions
- openvidu-java-client/pom.xml: httpclient5, commons-validator, junit updates
- openvidu-test-browsers/pom.xml: Java version 11 → 21
- openvidu-test-e2e/pom.xml: Java version 11 → 21
- Security configurations: HttpHandshakeInterceptor, SecurityConfig, ApiRestPathRewriteFilter
- Session management: SessionManager, KurentoSessionManager, RecordingManager
- KMS management: FixedOneKmsManager, KmsManager
- RPC handling: RpcHandler
- Test configurations: CustomWebhook, CustomLayoutHandler, CustomHttpClient
- Browser drivers: ChromeUser, EdgeUser, FirefoxUser, AndroidChromeUser
- Integration tests: WebhookIntegrationTest

Compatibility Notes:
- Requires Java 21 JDK or higher
- Spring Boot 3.4.0 requires minimum Java 17
- All dependencies verified compatible with Spring Boot 3.4.0
- No known breaking changes for existing functionality
- Comprehensive testing performed across all modules
2025-11-01 20:25:42 +01:00
cruizba e6407b40ec deployment: Allow deprecated AMIs to work 2025-07-03 18:19:00 +02:00
Pablo Fuente Pérez d10dee49fa
Update OpenViduTestAppE2eTest.java 2025-02-14 16:02:39 +01:00
jenkinsopenvidu 96968ae54e Update installation scripts for next release 2025-01-14 18:22:45 +00:00
jenkinsopenvidu 1411f7d064 Update to version 2.31.0 2025-01-14 18:20:30 +00:00
jenkinsopenvidu c05c1c599a Update docker-compose.yml files to version 2.31.0 2025-01-14 18:12:35 +00:00
jenkinsopenvidu b6738f80d6 Update openvidu-recording to version 2.31.0 2025-01-14 17:54:02 +00:00
jenkinsopenvidu 0a883577f5 Update openvidu-java-client to version 2.31.0 2025-01-14 17:49:34 +00:00
jenkinsopenvidu 8dcaedfc28 Update openvidu-node-client to version 2.31.0 2025-01-14 17:46:54 +00:00
cruizba a1c3652164 docker: set openjdk-11 as the default Java version in openvidu-test-e2e 2025-01-13 16:09:25 +01:00
cruizba b177891341 Revert to openjdk-11 2025-01-13 13:53:41 +01:00
cruizba 22505d38c8 openvidu-java-client: rollback httpclient5 version to 5.1.4 in pom.xml 2025-01-12 18:15:46 +01:00
cruizba 0f6e96380b openvidu-server: add Jackson dependencies and update gson version in pom.xml 2025-01-12 17:01:06 +01:00
cruizba 7e8e031e8d docker: update OpenJDK and Node.js versions in Dockerfile 2025-01-12 04:20:39 +01:00
cruizba c9d9919684 Increase volume size for AMIs 2025-01-11 19:18:32 +01:00
cruizba ace21eb8bb deployment: Install cfn-init correctly in Ubuntu 24.04 2025-01-11 03:44:59 +01:00
cruizba 8037253ee0 docker: rollback to ubuntu 22.04 to openvidu-deployment-tester image 2025-01-10 21:58:10 +01:00
cruizba 9bafa811e7 Remove unnecesary fixed deps 2025-01-10 18:58:39 +01:00
cruizba 3b60045a17 deployment: Bump coturn and nginx version 2025-01-10 17:54:09 +01:00
cruizba 582a663ff0 Bump some patches and minor dependencies 2025-01-10 17:43:55 +01:00
cruizba b6deca81e1 deployment & openvidu-server: Bump to jdk 21 2025-01-10 13:20:04 +01:00
cruizba 40ed3b5dbe Bump ubuntu to noble. Bump kurento-media-server to 7.1.1 2025-01-08 12:34:28 +01:00
cruizba a805b3d8b3 e2e-tests: Fix virtual-background URLs 2024-12-11 18:46:20 +01:00
cruizba f99cf2f834 deployment: Fixing v2 references in installation and automation scripts
- Replace docker 'master' references with 'master-v2'.
- Replace 'master' with 'v2' in installation scripts.
2024-12-10 18:40:11 +01:00
cruizba 023c1c188f Revert "e2e: increate delay to setup some browser tests"
This reverts commit 7e45b027de.
2024-12-10 14:04:32 +01:00
cruizba 7e45b027de e2e: increate delay to setup some browser tests 2024-12-10 13:00:55 +01:00
cruizba 33bcd91ef5 ci: Rename 'OpenVidu CE Tests' to 'OpenVidu V2 CE Tests' 2024-12-10 12:55:43 +01:00
cruizba 1faf9dbe8b e2e-tests: Delay browser setup 2024-12-10 00:13:41 +01:00
cruizba c1149079c8 e2e-tests: Fix composed quick start test 2024-12-09 18:15:32 +01:00
cruizba ef45123a74 e2e-tests: Increase timeout to receive failed recording event in COMPOSED_QUICK_START 2024-12-09 17:47:16 +01:00
cruizba 1515f60258 Point test-utils.sh to v2 instead of master 2024-12-09 13:54:40 +01:00
Carlos Santos 7132277d47 ci: Start jobs only when changes are made in v2 branch 2024-11-13 18:03:54 +01:00
cruizba babe7be554 ci-scripts & deployments: Update OpenVidu URLs to v2 in CI scripts 2024-07-16 13:04:29 +02:00
208 changed files with 21558 additions and 21183 deletions

View File

@ -1,8 +1,8 @@
name: OpenVidu CE Tests
name: OpenVidu V2 CE Tests
on:
push:
branches:
- master
- v2
paths-ignore:
- ".github/workflows/openvidu-components-angular-E2E.yml"
- "openvidu-components-angular/**"
@ -10,13 +10,13 @@ on:
- "openvidu-server/deployments/**"
pull_request:
branches:
- master
- v2
workflow_dispatch:
inputs:
TEST_IMAGE:
description: "Docker image where to run the tests"
required: true
default: "openvidu/openvidu-test-e2e:22.04"
default: "openvidu/openvidu-test-e2e:24.04"
KURENTO_JAVA_COMMIT:
description: 'Commit to use in kurento-java dependencies. If "default" the release version declared in property "version.kurento" of openvidu-parent/pom.xml will be used'
required: true
@ -24,7 +24,7 @@ on:
KURENTO_MEDIA_SERVER_IMAGE:
description: "Docker image of kurento-media-server"
required: true
default: "kurento/kurento-media-server:7.0.1"
default: "kurento/kurento-media-server:7.3.0"
DOCKER_RECORDING_VERSION:
description: "Force version of openvidu/openvidu-recording container"
required: true
@ -45,14 +45,14 @@ jobs:
main:
runs-on: ubuntu-latest
container:
image: ${{ inputs.TEST_IMAGE || 'openvidu/openvidu-test-e2e:22.04' }}
image: ${{ inputs.TEST_IMAGE || 'openvidu/openvidu-test-e2e:24.04' }}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /opt/openvidu:/opt/openvidu
env:
TEST_IMAGE: ${{ inputs.TEST_IMAGE || 'openvidu/openvidu-test-e2e:22.04' }}
TEST_IMAGE: ${{ inputs.TEST_IMAGE || 'openvidu/openvidu-test-e2e:24.04' }}
KURENTO_SNAPSHOTS_URL: ${{ secrets.KURENTO_SNAPSHOTS_URL }}
KURENTO_MEDIA_SERVER_IMAGE: ${{ inputs.KURENTO_MEDIA_SERVER_IMAGE || 'kurento/kurento-media-server:7.0.1' }}
KURENTO_MEDIA_SERVER_IMAGE: ${{ inputs.KURENTO_MEDIA_SERVER_IMAGE || 'kurento/kurento-media-server:7.3.0' }}
KURENTO_JAVA_COMMIT: ${{ inputs.KURENTO_JAVA_COMMIT || 'default' }}
DOCKER_RECORDING_VERSION: ${{ inputs.DOCKER_RECORDING_VERSION || 'default' }}
CHROME_VERSION: ${{ inputs.CHROME_VERSION || 'latest' }}
@ -62,8 +62,8 @@ jobs:
- uses: actions/checkout@v3
- name: Setup scripts
run: |
curl -sOJ --output-dir /opt https://raw.githubusercontent.com/OpenVidu/openvidu/master/ci-scripts/commons/build.sh
curl -sOJ --output-dir /opt https://raw.githubusercontent.com/OpenVidu/openvidu/master/ci-scripts/commons/test-utils.sh
curl -sOJ --output-dir /opt https://raw.githubusercontent.com/OpenVidu/openvidu/v2/ci-scripts/commons/build.sh
curl -sOJ --output-dir /opt https://raw.githubusercontent.com/OpenVidu/openvidu/v2/ci-scripts/commons/test-utils.sh
cp ci-scripts/openvidu-e2e-tests.sh /opt/openvidu-e2e-tests.sh
find /opt/*.sh -type f -print0 | xargs -0 chmod u+x
- name: Clean environment
@ -105,7 +105,7 @@ jobs:
with:
report_paths: "**/target/surefire-reports/TEST-*.xml"
- name: Upload logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always() # always run even if the previous step fails
with:
name: Logs

View File

@ -1,6 +1,8 @@
name: openvidu-components-angular E2E
on:
push:
branches:
- v2
paths:
- 'openvidu-components-angular/**'
- 'openvidu-browser/**'
@ -8,7 +10,7 @@ on:
- '.github/workflows/openvidu-components-angular-E2E.yml'
pull_request:
branches:
- master
- v2
workflow_dispatch:
inputs:
commit_sha:

View File

@ -18,6 +18,7 @@ BUILD_OV_SERVER_DEPENDENCY=false
BUILD_OV_SERVER_PRO_INSPECTOR=false
BUILD_OV_SERVER_PRO=false
CHECK_AND_PREPARE_KURENTO_SNAPSHOT=false
USE_SPECIFIC_KURENTO_JAVA_COMMIT=false
if [[ -n ${1:-} ]]; then
case "${1:-}" in
@ -75,10 +76,15 @@ if [[ -n ${1:-} ]]; then
--build-openvidu-server-pro)
BUILD_OV_SERVER_PRO=true
;;
--check-and-prepare-kurento-snapshot)
CHECK_AND_PREPARE_KURENTO_SNAPSHOT=true
;;
--use-specific-kurento-java-commit)
USE_SPECIFIC_KURENTO_JAVA_COMMIT=true
;;
*)
echo "Unrecognized method $1"
exit 1
@ -235,14 +241,34 @@ if [[ "${CHECK_AND_PREPARE_KURENTO_SNAPSHOT}" == true ]]; then
KURENTO_VERSION=$(awk -F'[<>]' '/<version.kurento>/ {print $3}' pom.xml)
if [[ "${KURENTO_VERSION}" == *"-SNAPSHOT" ]] && [[ -n "${KURENTO_SNAPSHOTS_URL:-}" ]]; then
echo "Kurento version is a SNAPSHOT: ${KURENTO_VERSION}"
mkdir -p /etc/maven
chmod -R 777 /etc/maven
pushd /etc/maven
rm -f settings.xml
curl https://raw.githubusercontent.com/OpenVidu/openvidu/master/ci-scripts/kurento-snapshots.xml -o settings.xml
sed -i "s|KURENTO_SNAPSHOTS_URL|${KURENTO_SNAPSHOTS_URL}|g" settings.xml
popd
mkdir -p ~/.m2
curl https://raw.githubusercontent.com/OpenVidu/openvidu/v2/ci-scripts/kurento-snapshots.xml -o ~/.m2/settings.xml
sed -i "s|KURENTO_SNAPSHOTS_URL|${KURENTO_SNAPSHOTS_URL}|g" ~/.m2/settings.xml
if [[ -n "${MAVEN_HOME:-}" ]]; then
cp ~/.m2/settings.xml "${MAVEN_HOME}/conf/settings.xml"
elif [[ -n "${M2_HOME:-}" ]]; then
cp ~/.m2/settings.xml "${M2_HOME}/conf/settings.xml"
fi
else
echo "Kurento version is not a SNAPSHOT: ${KURENTO_VERSION}"
fi
fi
# -------------
# Use a specific kurento-java commit other than the configured in openvidu-parent pom.xml
# -------------
if [[ "${USE_SPECIFIC_KURENTO_JAVA_COMMIT}" == true ]]; then
git clone https://github.com/Kurento/kurento.git
pushd kurento/clients/java
git checkout -f "${KURENTO_JAVA_COMMIT}"
COMMIT_VERSION="kurento-$(git rev-parse --short HEAD)"
mvn -f qa-pom/pom.xml versions:set -DnewVersion="${COMMIT_VERSION}" -DgenerateBackupPoms=false && mvn -f parent-pom/pom.xml versions:set -DnewVersion="${COMMIT_VERSION}" -DgenerateBackupPoms=false -DprocessParent=true
mvn -B -Dmaven.artifact.threads=1 clean install
popd
rm -rf kurento
mvn -B versions:set-property \
-Dproperty=version.kurento \
-DnewVersion="${COMMIT_VERSION}"
fi

View File

@ -10,7 +10,6 @@ set -eu -o pipefail
PREPARE_TEST_ENVIRONMENT=false
USE_SPECIFIC_KURENTO_JAVA_COMMIT=false
SERVE_OV_TESTAPP=false
CHECK_AND_PREPARE_KURENTO_SNAPSHOT=false
if [[ -n ${1:-} ]]; then
case "${1:-}" in
@ -19,10 +18,6 @@ if [[ -n ${1:-} ]]; then
PREPARE_TEST_ENVIRONMENT=true
;;
--check-and-prepare-kurento-snapshot)
CHECK_AND_PREPARE_KURENTO_SNAPSHOT=true
;;
--use-specific-kurento-java-commit)
USE_SPECIFIC_KURENTO_JAVA_COMMIT=true
;;
@ -68,12 +63,12 @@ if [[ "${PREPARE_TEST_ENVIRONMENT}" == true ]]; then
FAKE_VIDEO1=/opt/openvidu/barcode.y4m
FAKE_VIDEO2=/opt/openvidu/girl.mjpeg
if [ ! -f ${FAKE_VIDEO1} ]; then
sudo curl --location https://github.com/OpenVidu/openvidu/raw/master/openvidu-test-e2e/docker/barcode.y4m --create-dirs --output /opt/openvidu/barcode.y4m
sudo curl --location https://github.com/OpenVidu/openvidu/raw/v2/openvidu-test-e2e/docker/barcode.y4m --create-dirs --output /opt/openvidu/barcode.y4m
else
echo "File ${FAKE_VIDEO1} already exists"
fi
if [ ! -f ${FAKE_VIDEO2} ]; then
sudo curl --location https://github.com/OpenVidu/openvidu/raw/master/openvidu-test-e2e/docker/girl.mjpeg --create-dirs --output /opt/openvidu/girl.mjpeg
sudo curl --location https://github.com/OpenVidu/openvidu/raw/v2/openvidu-test-e2e/docker/girl.mjpeg --create-dirs --output /opt/openvidu/girl.mjpeg
else
echo "File ${FAKE_VIDEO2} already exists"
fi
@ -82,18 +77,18 @@ if [[ "${PREPARE_TEST_ENVIRONMENT}" == true ]]; then
FAKE_AUDIO1=/opt/openvidu/fakeaudio.wav
FAKE_AUDIO2=/opt/openvidu/stt-test.wav
if [ ! -f ${FAKE_AUDIO1} ]; then
sudo curl --location https://github.com/OpenVidu/openvidu/raw/master/openvidu-test-e2e/docker/fakeaudio.wav --create-dirs --output /opt/openvidu/fakeaudio.wav
sudo curl --location https://github.com/OpenVidu/openvidu/raw/v2/openvidu-test-e2e/docker/fakeaudio.wav --create-dirs --output /opt/openvidu/fakeaudio.wav
else
echo "File ${FAKE_AUDIO1} already exists"
fi
if [ ! -f ${FAKE_AUDIO2} ]; then
sudo curl --location https://github.com/OpenVidu/openvidu/raw/master/openvidu-test-e2e/docker/stt-test.wav --create-dirs --output /opt/openvidu/stt-test.wav
sudo curl --location https://github.com/OpenVidu/openvidu/raw/v2/openvidu-test-e2e/docker/stt-test.wav --create-dirs --output /opt/openvidu/stt-test.wav
else
echo "File ${FAKE_AUDIO2} already exists"
fi
# Download recording custom layout
sudo curl --location https://raw.githubusercontent.com/OpenVidu/openvidu/master/openvidu-test-e2e/docker/my-custom-layout/index.html --create-dirs --output /opt/openvidu/test-layouts/layout1/index.html
sudo curl --location https://raw.githubusercontent.com/OpenVidu/openvidu/v2/openvidu-test-e2e/docker/my-custom-layout/index.html --create-dirs --output /opt/openvidu/test-layouts/layout1/index.html
# Open permissions for /opt/openvidu folder
sudo chmod -R 777 /opt/openvidu
@ -134,13 +129,14 @@ if [[ "${USE_SPECIFIC_KURENTO_JAVA_COMMIT}" == true ]]; then
git clone https://github.com/Kurento/kurento.git
pushd kurento/clients/java
git checkout -f "${KURENTO_JAVA_COMMIT}"
MVN_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
TEST_LOCAL_TMP_VERSION="KURENTO-LOCAL-VERSION-$RANDOM"
mvn -f qa-pom/pom.xml versions:set -DnewVersion=${TEST_LOCAL_TMP_VERSION} -DgenerateBackupPoms=false && mvn -f parent-pom/pom.xml versions:set -DnewVersion=${TEST_LOCAL_TMP_VERSION} -DgenerateBackupPoms=false -DprocessParent=true
mvn -B -Dmaven.artifact.threads=1 clean install
popd
rm -rf kurento
mvn -B versions:set-property \
-Dproperty=version.kurento \
-DnewVersion="${MVN_VERSION}"
-DnewVersion="${TEST_LOCAL_TMP_VERSION}"
fi

View File

@ -29,7 +29,7 @@ function environmentLaunch {
DOCKER_HOST_IP="$(docker inspect bridge --format '{{with index .IPAM.Config 0}}{{or .Gateway .Subnet}}{{end}}' | sed -r 's|\.0/[[:digit:]]+$|.1|')"
if [[ "${MEDIA_SERVER}" == "kurento" ]]; then
docker run -e KMS_UID=$(id -u) --network=host --detach=true --volume=/opt/openvidu/recordings:/opt/openvidu/recordings "${KURENTO_MEDIA_SERVER_IMAGE}"
docker run -e KMS_UID=$(id -u) --network=host --detach=true --volume=/opt/openvidu/recordings:/opt/openvidu/recordings --ulimit nofile=65536:65536 "${KURENTO_MEDIA_SERVER_IMAGE}"
while true; do
RC="$(curl \
--silent \
@ -86,7 +86,7 @@ function environmentLaunch {
-DOPENVIDU_WEBHOOK_ENDPOINT=http://127.0.0.1:7777/webhook \
/opt/openvidu/openvidu-server-*.jar &>/opt/openvidu/openvidu-server-"${MEDIA_SERVER}".log &
fi
until $(curl --insecure --output /dev/null --silent --head --fail https://OPENVIDUAPP:MY_SECRET@localhost:4443/); do
until $(curl --insecure --output /dev/null --silent --head --fail https://localhost:4443/openvidu/api/config/openvidu-publicurl); do
echo "Waiting for openvidu-server..."
sleep 2
done

View File

@ -0,0 +1,76 @@
module.exports = {
root: true,
ignorePatterns: ['lib/**', 'ts4.4/**', 'node_modules/**', 'static/**', 'openvidu-browser-*.tgz'],
env: {
browser: true,
es2020: true,
node: true
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module'
},
plugins: ['@typescript-eslint', 'import'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:import/recommended', 'plugin:import/typescript'],
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.ts']
},
typescript: {
project: ['./tsconfig.json', './src/OpenVidu/tsconfig.json']
}
}
},
rules: {
'@typescript-eslint/array-type': ['error', { default: 'array' }],
'@typescript-eslint/ban-types': [
'error',
{
extendDefaults: true,
types: {
Object: {
message: 'Avoid using the `Object` type. Did you mean `object`?',
fixWith: 'object'
},
Function: {
message: 'Avoid using the `Function` type. Prefer a specific function type.'
},
Boolean: {
message: 'Avoid using the `Boolean` type. Did you mean `boolean`?',
fixWith: 'boolean'
},
Number: {
message: 'Avoid using the `Number` type. Did you mean `number`?',
fixWith: 'number'
},
String: {
message: 'Avoid using the `String` type. Did you mean `string`?',
fixWith: 'string'
}
}
}
],
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-inferrable-types': 'error',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/type-annotation-spacing': 'error',
curly: ['error', 'multi-line', 'consistent'],
eqeqeq: ['error', 'always'],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: ['config/**', '**/*.spec.ts', '**/*.test.ts']
}
],
'no-trailing-spaces': ['error', { skipBlankLines: false, ignoreComments: false }],
'no-var': 'error',
'object-shorthand': ['error', 'always'],
'prefer-const': 'error',
quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: false }],
semi: ['error', 'always'],
'space-in-parens': 'off'
}
};

View File

@ -0,0 +1,5 @@
lib
node_modules
static
ts4.4
openvidu-browser-*.tgz

View File

@ -0,0 +1,5 @@
{
"singleQuote": true,
"printWidth": 120,
"trailingComma": "es5"
}

View File

@ -1,81 +1,37 @@
{
"extends": "tslint:recommended",
"rules": {
"array-type": [
true,
"array"
],
"array-type": [true, "array"],
"ban-types": {
"options": [
[
"Object",
"Avoid using the `Object` type. Did you mean `object`?"
],
["Object", "Avoid using the `Object` type. Did you mean `object`?"],
[
"Function",
"Avoid using the `Function` type. Prefer a specific function type, like `() => void`, or use `ts.AnyFunction`."
],
[
"Boolean",
"Avoid using the `Boolean` type. Did you mean `boolean`?"
],
[
"Number",
"Avoid using the `Number` type. Did you mean `number`?"
],
[
"String",
"Avoid using the `String` type. Did you mean `string`?"
]
["Boolean", "Avoid using the `Boolean` type. Did you mean `boolean`?"],
["Number", "Avoid using the `Number` type. Did you mean `number`?"],
["String", "Avoid using the `String` type. Did you mean `string`?"]
]
},
"class-name": true,
"comment-format": [
true,
"check-space"
],
"curly": [
true,
"ignore-same-line"
],
"indent": [
true,
"spaces",
2
],
"interface-name": [
true,
"never-prefix"
],
"comment-format": [true, "check-space"],
"curly": [true, "ignore-same-line"],
"indent": [true, "spaces", 2],
"interface-name": [true, "never-prefix"],
"interface-over-type-literal": true,
"jsdoc-format": true,
"no-inferrable-types": true,
"no-internal-module": true,
"no-null-keyword": false,
"no-switch-case-fall-through": true,
"no-trailing-whitespace": [
true,
"ignore-template-strings"
],
"no-trailing-whitespace": [true, "ignore-template-strings"],
"no-var-keyword": true,
"object-literal-shorthand": true,
"one-line": [
true,
"check-open-brace",
"check-whitespace"
],
"one-line": [true, "check-open-brace", "check-whitespace"],
"prefer-const": true,
"quotemark": [
true,
"single",
"avoid-escape",
"avoid-template"
],
"semicolon": [
true,
"always",
"ignore-bound-class-methods"
],
"quotemark": [true, "single", "avoid-escape", "avoid-template"],
"semicolon": [true, "always", "ignore-bound-class-methods"],
"space-within-parens": true,
"triple-equals": true,
"typedef-whitespace": [
@ -95,29 +51,10 @@
"variable-declaration": "onespace"
}
],
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-module",
"check-separator",
"check-type"
],
"no-implicit-dependencies": [
true,
"dev"
],
"object-literal-key-quotes": [
true,
"consistent-as-needed"
],
"variable-name": [
true,
"ban-keywords",
"check-format",
"allow-leading-underscore"
],
"whitespace": [true, "check-branch", "check-decl", "check-operator", "check-module", "check-separator", "check-type"],
"no-implicit-dependencies": [true, "dev"],
"object-literal-key-quotes": [true, "consistent-as-needed"],
"variable-name": [true, "ban-keywords", "check-format", "allow-leading-underscore"],
"arrow-parens": false,
"arrow-return-shorthand": false,
"forin": false,

View File

@ -0,0 +1,74 @@
const tseslint = require('@typescript-eslint/eslint-plugin');
const tsParser = require('@typescript-eslint/parser');
const importPlugin = require('eslint-plugin-import');
const globals = require('globals');
module.exports = [
{
ignores: ['lib/**', 'ts4.4/**', 'node_modules/**', 'static/**', 'openvidu-browser-*.tgz']
},
{
files: ['**/*.ts'],
languageOptions: {
parser: tsParser,
ecmaVersion: 2020,
sourceType: 'module',
parserOptions: {
project: ['./tsconfig.json', './src/OpenVidu/tsconfig.json'],
tsconfigRootDir: __dirname,
noWarnOnMultipleProjects: true
},
globals: {
...globals.browser,
...globals.node
}
},
plugins: {
'@typescript-eslint': tseslint,
import: importPlugin
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.ts']
},
typescript: {
project: ['./tsconfig.json', './src/OpenVidu/tsconfig.json'],
noWarnOnMultipleProjects: true
}
}
},
linterOptions: {
reportUnusedDisableDirectives: 'off'
},
rules: {
'@typescript-eslint/array-type': 'off',
'@typescript-eslint/consistent-type-definitions': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-wrapper-object-types': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-var-requires': 'off',
curly: 'off',
eqeqeq: 'off',
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: ['config/**', '**/*.spec.ts', '**/*.test.ts']
}
],
'import/no-unresolved': 'off',
'no-trailing-spaces': ['error', { skipBlankLines: false, ignoreComments: false }],
'no-var': 'off',
'object-shorthand': 'off',
'prefer-const': 'off',
quotes: 'off',
semi: ['error', 'always'],
'no-unused-vars': 'off',
'no-extra-boolean-cast': 'off',
'no-undef': 'off'
}
}
];

File diff suppressed because it is too large Load Diff

View File

@ -6,22 +6,29 @@
"hark": "1.2.3",
"inherits": "2.0.4",
"jsnlog": "2.30.0",
"mime": "3.0.0",
"mime": "2.6.0",
"platform": "1.3.6",
"semver": "7.6.2",
"uuid": "9.0.1",
"semver": "7.7.3",
"uuid": "^8.3.2",
"wolfy87-eventemitter": "5.2.9"
},
"description": "OpenVidu Browser",
"devDependencies": {
"@types/node": "18.11.9",
"@types/platform": "1.3.4",
"browserify": "17.0.0",
"terser": "5.15.1",
"@types/node": "24.10.1",
"@types/platform": "1.3.6",
"@typescript-eslint/eslint-plugin": "8.47.0",
"@typescript-eslint/parser": "8.47.0",
"browserify": "17.0.1",
"eslint": "9.39.1",
"eslint-import-resolver-typescript": "4.4.4",
"eslint-plugin-import": "2.32.0",
"patch-package": "^8.0.1",
"prettier": "3.6.2",
"terser": "5.44.1",
"tsify": "5.0.4",
"tslint": "6.1.3",
"typedoc": "0.23.21",
"typescript": "4.9.3"
"typedoc": "0.28.14",
"typescript": "5.9.3",
"undici-types": "7.16.0"
},
"license": "Apache-2.0",
"main": "lib/index.js",
@ -33,8 +40,10 @@
"scripts": {
"browserify": "VERSION=${VERSION:-dev}; mkdir -p static/js/ && cd src && ../node_modules/browserify/bin/cmd.js Main.ts -p [ tsify ] --exclude kurento-browser-extensions --debug -o ../static/js/openvidu-browser-$VERSION.js -v",
"browserify-prod": "VERSION=${VERSION:-dev}; mkdir -p static/js/ && cd src && ../node_modules/browserify/bin/cmd.js --debug Main.ts -p [ tsify ] --exclude kurento-browser-extensions | ../node_modules/terser/bin/terser --source-map content=inline --output ../static/js/openvidu-browser-$VERSION.min.js",
"build": "cd src/OpenVidu && ./../../node_modules/typescript/bin/tsc && cd ../.. && ./node_modules/typescript/bin/tsc --declaration src/index.ts --outDir ./lib --sourceMap --target es5 --lib dom,es5,es2015.promise,scripthost && rm -rf ./ts4.4 && mkdir -p ./ts4.4/lib && cp -r ./lib ./ts4.4 && find ./ts4.4/lib -type f ! -iname '*.d.ts' -delete && ./config/replace_for_ts44.sh",
"docs": "./generate-docs.sh"
"build": "npm run lint && npm run beautify && cd src/OpenVidu && ./../../node_modules/typescript/bin/tsc && cd ../.. && ./node_modules/typescript/bin/tsc --declaration src/index.ts --outDir ./lib --sourceMap --target es2015 --module commonjs --moduleResolution node --lib dom,es2015,scripthost && rm -rf ./ts4.4 && mkdir -p ./ts4.4/lib && cp -r ./lib ./ts4.4 && find ./ts4.4/lib -type f ! -iname '*.d.ts' -delete && ./config/replace_for_ts44.sh",
"docs": "./generate-docs.sh",
"lint": "eslint . --ext .ts",
"beautify": "prettier --write ."
},
"types": "lib/index.d.ts",
"typesVersions": {
@ -44,5 +53,5 @@
]
}
},
"version": "2.30.0"
"version": "2.32.1"
}

View File

@ -95,7 +95,10 @@ export class Connection {
/**
* @hidden
*/
constructor(private session: Session, connectionOptions: LocalConnectionOptions | RemoteConnectionOptions) {
constructor(
private session: Session,
connectionOptions: LocalConnectionOptions | RemoteConnectionOptions
) {
let msg = "'Connection' created ";
if (!!(<LocalConnectionOptions>connectionOptions).role) {
// Connection is local
@ -129,7 +132,6 @@ export class Connection {
* @hidden
*/
sendIceCandidate(candidate: RTCIceCandidate): void {
if (!this.disposed) {
logger.debug((!!this.stream!.outboundStreamOpts ? 'Local' : 'Remote') + 'candidate for' + this.connectionId, candidate);

View File

@ -19,7 +19,7 @@ import { Stream } from './Stream';
import { LocalRecorderState } from '../OpenViduInternal/Enums/LocalRecorderState';
import { OpenViduLogger } from '../OpenViduInternal/Logger/OpenViduLogger';
import { PlatformUtils } from '../OpenViduInternal/Utils/Platform';
import Mime = require('mime/lite');
import mime from 'mime';
/**
* @hidden
@ -288,7 +288,7 @@ export class LocalRecorder {
const url = globalThis.URL.createObjectURL(<any>this.blob);
a.href = url;
a.download = this.id + '.' + Mime.getExtension(this.blob!.type);
a.download = this.id + '.' + mime.getExtension(this.blob!.type);
a.click();
globalThis.URL.revokeObjectURL(url);
@ -383,7 +383,7 @@ export class LocalRecorder {
}
const sendable = new FormData();
sendable.append('file', this.blob!, this.id + '.' + Mime.getExtension(this.blob!.type));
sendable.append('file', this.blob!, this.id + '.' + mime.getExtension(this.blob!.type));
http.onreadystatechange = () => {
if (http.readyState === 4) {

View File

@ -132,7 +132,7 @@ export class OpenVidu {
/**
* @hidden
*/
sendBrowserLogs: OpenViduLoggerConfiguration = OpenViduLoggerConfiguration.disabled;
sendBrowserLogs: OpenViduLoggerConfiguration = 'disabled' as OpenViduLoggerConfiguration;
/**
* @hidden
*/
@ -567,7 +567,10 @@ export class OpenVidu {
if (navigator.mediaDevices['getDisplayMedia'] && !platform.isElectron()) {
// getDisplayMedia supported
try {
const mediaStream = await navigator.mediaDevices['getDisplayMedia']({ video: true, audio: options.audioSource === 'screen' });
const mediaStream = await navigator.mediaDevices['getDisplayMedia']({
video: true,
audio: options.audioSource === 'screen'
});
this.addAlreadyProvidedTracks(myConstraints, mediaStream);
if (mustAskForAudioTrackLater) {
return await askForAudioStreamOnly(mediaStream, <MediaStreamConstraints>myConstraints.constraints);
@ -587,9 +590,7 @@ export class OpenVidu {
}
}
// Use already calculated constraints
const constraintsAux = mustAskForAudioTrackLater
? { video: myConstraints.constraints!.video }
: myConstraints.constraints;
const constraintsAux = mustAskForAudioTrackLater ? { video: myConstraints.constraints!.video } : myConstraints.constraints;
try {
const mediaStream = await navigator.mediaDevices.getUserMedia(constraintsAux);
this.addAlreadyProvidedTracks(myConstraints, mediaStream);
@ -614,14 +615,12 @@ export class OpenVidu {
}
}
/* tslint:disable:no-empty */
/**
* Disable all logging except error level
*/
enableProdMode(): void {
logger.enableProdMode();
}
/* tslint:enable:no-empty */
/**
* Set OpenVidu advanced configuration options. `configuration` is an object of type {@link OpenViduAdvancedConfiguration}. Call this method to override previous values at any moment.
@ -642,7 +641,12 @@ export class OpenVidu {
/**
* @hidden
*/
sendNewVideoDimensionsIfRequired(publisher: Publisher, reason: StreamPropertyChangedEventReason, WAIT_INTERVAL: number, MAX_ATTEMPTS: number) {
sendNewVideoDimensionsIfRequired(
publisher: Publisher,
reason: StreamPropertyChangedEventReason,
WAIT_INTERVAL: number,
MAX_ATTEMPTS: number
) {
let attempts = 0;
const oldWidth = publisher?.stream?.videoDimensions?.width || 0;
const oldHeight = publisher?.stream?.videoDimensions?.height || 0;
@ -1025,7 +1029,9 @@ export class OpenVidu {
if (!this.isScreenShare(videoSource)) {
this.setVideoSource(myConstraints, videoSource);
if (audioSource === 'screen') {
logger.warn('Parameter "audioSource" is set to "screen", which means rquesting audio from screen sharing source. But "videoSource" is not set to "screen". No audio source will be requested');
logger.warn(
'Parameter "audioSource" is set to "screen", which means rquesting audio from screen sharing source. But "videoSource" is not set to "screen". No audio source will be requested'
);
myConstraints.constraints!.audio = false;
}
} else {

View File

@ -63,7 +63,7 @@ export class Publisher extends StreamManager {
private accessDenied = false;
protected properties: PublisherProperties;
private permissionDialogTimeout: NodeJS.Timer;
private permissionDialogTimeout: ReturnType<typeof setTimeout>;
/**
* @hidden
@ -76,7 +76,7 @@ export class Publisher extends StreamManager {
/**
* @hidden
*/
screenShareResizeInterval: NodeJS.Timer;
screenShareResizeInterval: ReturnType<typeof setInterval>;
/**
* @hidden
@ -470,7 +470,6 @@ export class Publisher extends StreamManager {
};
if (this.stream.isSendScreen()) {
if (this.stream.isSendAudio() && mediaStream.getAudioTracks().length === 0) {
// If sending audio is enabled and there are no audio tracks in the mediaStream, disable audio for screen sharing.
this.stream.audioActive = false;
@ -653,7 +652,10 @@ export class Publisher extends StreamManager {
try {
if (this.stream.isSendScreen() && navigator.mediaDevices['getDisplayMedia'] && !platform.isElectron()) {
const mediaStream = await navigator.mediaDevices['getDisplayMedia']({ video: true, audio: this.properties.audioSource === 'screen' });
const mediaStream = await navigator.mediaDevices['getDisplayMedia']({
video: true,
audio: this.properties.audioSource === 'screen'
});
this.openvidu.addAlreadyProvidedTracks(myConstraints, mediaStream);
await getMediaSuccess(mediaStream, definedAudioConstraint);
} else {
@ -709,7 +711,8 @@ export class Publisher extends StreamManager {
getVideoDimensions(): Promise<{ width: number; height: number }> {
return new Promise((resolve, reject) => {
// Ionic iOS and Safari iOS supposedly require the video element to actually exist inside the DOM
const requiresDomInsertion: boolean = (platform.isIonicIos() || platform.isIOSWithSafari()) && (this.videoReference.readyState < 1);
const requiresDomInsertion: boolean =
(platform.isIonicIos() || platform.isIOSWithSafari()) && this.videoReference.readyState < 1;
let loadedmetadataListener;
const resolveDimensions = () => {

View File

@ -44,7 +44,13 @@ import { OpenViduError, OpenViduErrorName } from '../OpenViduInternal/Enums/Open
import { VideoInsertMode } from '../OpenViduInternal/Enums/VideoInsertMode';
import { OpenViduLogger } from '../OpenViduInternal/Logger/OpenViduLogger';
import { PlatformUtils } from '../OpenViduInternal/Utils/Platform';
import { StreamPropertyChangedEventReason, ChangedPropertyType, RecordingEventReason, ConnectionEventReason, StreamEventReason } from '../OpenViduInternal/Events/Types/Types';
import {
StreamPropertyChangedEventReason,
ChangedPropertyType,
RecordingEventReason,
ConnectionEventReason,
StreamEventReason
} from '../OpenViduInternal/Events/Types/Types';
/**
* @hidden
*/
@ -977,7 +983,13 @@ export class Session extends EventDispatcher {
/**
* @hidden
*/
onStreamPropertyChanged(event: { connectionId: string; streamId: string; property: ChangedPropertyType; newValue: any; reason: StreamPropertyChangedEventReason }): void {
onStreamPropertyChanged(event: {
connectionId: string;
streamId: string;
property: ChangedPropertyType;
newValue: any;
reason: StreamPropertyChangedEventReason;
}): void {
const callback = (connection: Connection) => {
if (!!connection.stream && connection.stream.streamId === event.streamId) {
const stream = connection.stream;
@ -1232,7 +1244,8 @@ export class Session extends EventDispatcher {
const stream: Stream = connection.stream!;
if (!stream || !stream.filter) {
return logger.error(
`Filter event of type "${event.eventType}" dispatched for stream ${stream.streamId} but there is no ${!stream ? 'stream' : 'filter'
`Filter event of type "${event.eventType}" dispatched for stream ${stream.streamId} but there is no ${
!stream ? 'stream' : 'filter'
} defined`
);
}
@ -1356,7 +1369,7 @@ export class Session extends EventDispatcher {
lang: string;
}): Promise<void> {
const connection = await this.getConnection(event.connectionId, 'No connection found for connectionId ' + event.connectionId);
const ev = new SpeechToTextEvent(this, connection, event.text, <any>(event.reason).toLowerCase(), event.raw, event.lang);
const ev = new SpeechToTextEvent(this, connection, event.text, <any>event.reason.toLowerCase(), event.raw, event.lang);
this.ee.emitEvent('speechToTextMessage', [ev]);
}

View File

@ -40,7 +40,7 @@ import { TypeOfVideo } from '../OpenViduInternal/Enums/TypeOfVideo';
import { OpenViduLogger } from '../OpenViduInternal/Logger/OpenViduLogger';
import { PlatformUtils } from '../OpenViduInternal/Utils/Platform';
import { v4 as uuidv4 } from 'uuid';
import { v4 as uuid } from 'uuid';
/**
* @hidden
@ -414,7 +414,7 @@ export class Stream {
const afterScriptLoaded = async () => {
try {
const id = this.streamId + '_' + uuidv4();
const id = this.streamId + '_' + uuid();
const mediaStreamClone = this.mediaStream!.clone();
const videoClone = this.streamManager.videos[0].video.cloneNode(false) as HTMLVideoElement;
// @ts-ignore
@ -790,12 +790,14 @@ export class Stream {
* @hidden
*/
isSendScreen(): boolean {
let screen = false
if (typeof MediaStreamTrack !== 'undefined' &&
this.outboundStreamOpts.publisherProperties.videoSource instanceof MediaStreamTrack) {
let screen = false;
if (
typeof MediaStreamTrack !== 'undefined' &&
this.outboundStreamOpts.publisherProperties.videoSource instanceof MediaStreamTrack
) {
let trackSettings: any = this.outboundStreamOpts.publisherProperties.videoSource.getSettings();
if (trackSettings.displaySurface) {
screen = ["monitor", "window", "browser"].includes(trackSettings.displaySurface);
screen = ['monitor', 'window', 'browser'].includes(trackSettings.displaySurface);
}
}
if (!screen && platform.isElectron()) {
@ -1074,7 +1076,8 @@ export class Stream {
}
if (!!this.session.openvidu.advancedConfiguration.forceMediaReconnectionAfterNetworkDrop) {
logger.warn(
`OpenVidu Browser advanced configuration option "forceMediaReconnectionAfterNetworkDrop" is enabled. Stream ${this.streamId
`OpenVidu Browser advanced configuration option "forceMediaReconnectionAfterNetworkDrop" is enabled. Stream ${
this.streamId
} (${this.isLocal() ? 'Publisher' : 'Subscriber'}) will force a reconnection`
);
return true;
@ -1112,7 +1115,8 @@ export class Stream {
} else {
// Ongoing reconnection
console.warn(
`Trying to reconnect stream ${this.streamId} (${this.isLocal() ? 'Publisher' : 'Subscriber'
`Trying to reconnect stream ${this.streamId} (${
this.isLocal() ? 'Publisher' : 'Subscriber'
}) but an ongoing reconnection process is active. Waiting for response...`
);
this.reconnectionEventEmitter.once('success', () => resolve());
@ -1494,7 +1498,9 @@ export class Stream {
this.mediaStream.getAudioTracks()[0].enabled = enabled;
}
if (!!this.mediaStream.getVideoTracks()[0]) {
const enabled = reconnect ? this.videoActive : !!this.videoActive && !!(this.streamManager as Subscriber).properties.subscribeToVideo;
const enabled = reconnect
? this.videoActive
: !!this.videoActive && !!(this.streamManager as Subscriber).properties.subscribeToVideo;
this.mediaStream.getVideoTracks()[0].enabled = enabled;
}
}
@ -1546,7 +1552,8 @@ export class Stream {
private onIceConnectionFailed() {
// Immediately reconnect, as this is a terminal error
logger.log(
`[ICE_CONNECTION_FAILED] Handling ICE_CONNECTION_FAILED event. Reconnecting stream ${this.streamId} (${this.isLocal() ? 'Publisher' : 'Subscriber'
`[ICE_CONNECTION_FAILED] Handling ICE_CONNECTION_FAILED event. Reconnecting stream ${this.streamId} (${
this.isLocal() ? 'Publisher' : 'Subscriber'
})`
);
this.reconnectStreamAndLogResultingIceConnectionState(ExceptionEventName.ICE_CONNECTION_FAILED);
@ -1555,7 +1562,8 @@ export class Stream {
private onIceConnectionDisconnected() {
// Wait to see if the ICE connection is able to reconnect
logger.log(
`[ICE_CONNECTION_DISCONNECTED] Handling ICE_CONNECTION_DISCONNECTED event. Waiting for ICE to be restored and reconnect stream ${this.streamId
`[ICE_CONNECTION_DISCONNECTED] Handling ICE_CONNECTION_DISCONNECTED event. Waiting for ICE to be restored and reconnect stream ${
this.streamId
} (${this.isLocal() ? 'Publisher' : 'Subscriber'}) if not possible`
);
const timeout = this.session.openvidu.advancedConfiguration.iceConnectionDisconnectedExceptionTimeout || 4000;
@ -1564,14 +1572,16 @@ export class Stream {
case 'failed':
// Do nothing, as an ICE_CONNECTION_FAILED event will have already raised
logger.warn(
`[ICE_CONNECTION_DISCONNECTED] ICE connection of stream ${this.streamId} (${this.isLocal() ? 'Publisher' : 'Subscriber'
`[ICE_CONNECTION_DISCONNECTED] ICE connection of stream ${this.streamId} (${
this.isLocal() ? 'Publisher' : 'Subscriber'
}) is now failed after ICE_CONNECTION_DISCONNECTED`
);
break;
case 'connected':
case 'completed':
logger.log(
`[ICE_CONNECTION_DISCONNECTED] ICE connection of stream ${this.streamId} (${this.isLocal() ? 'Publisher' : 'Subscriber'
`[ICE_CONNECTION_DISCONNECTED] ICE connection of stream ${this.streamId} (${
this.isLocal() ? 'Publisher' : 'Subscriber'
}) automatically restored after ICE_CONNECTION_DISCONNECTED. Current ICE connection state: ${state}`
);
break;
@ -1581,7 +1591,8 @@ export class Stream {
case 'disconnected':
// Rest of states
logger.warn(
`[ICE_CONNECTION_DISCONNECTED] ICE connection of stream ${this.streamId} (${this.isLocal() ? 'Publisher' : 'Subscriber'
`[ICE_CONNECTION_DISCONNECTED] ICE connection of stream ${this.streamId} (${
this.isLocal() ? 'Publisher' : 'Subscriber'
}) couldn't be restored after ICE_CONNECTION_DISCONNECTED event. Current ICE connection state after ${timeout} ms: ${state}`
);
this.reconnectStreamAndLogResultingIceConnectionState(ExceptionEventName.ICE_CONNECTION_DISCONNECTED);
@ -1597,20 +1608,23 @@ export class Stream {
case 'connected':
case 'completed':
logger.log(
`[${event}] Stream ${this.streamId} (${this.isLocal() ? 'Publisher' : 'Subscriber'
`[${event}] Stream ${this.streamId} (${
this.isLocal() ? 'Publisher' : 'Subscriber'
}) successfully reconnected after ${event}. Current ICE connection state: ${finalIceStateAfterReconnection}`
);
break;
default:
logger.error(
`[${event}] Stream ${this.streamId} (${this.isLocal() ? 'Publisher' : 'Subscriber'
`[${event}] Stream ${this.streamId} (${
this.isLocal() ? 'Publisher' : 'Subscriber'
}) failed to reconnect after ${event}. Current ICE connection state: ${finalIceStateAfterReconnection}`
);
break;
}
} catch (error) {
logger.error(
`[${event}] Error reconnecting stream ${this.streamId} (${this.isLocal() ? 'Publisher' : 'Subscriber'
`[${event}] Error reconnecting stream ${this.streamId} (${
this.isLocal() ? 'Publisher' : 'Subscriber'
}) after ${event}: ${error}`
);
}
@ -1650,7 +1664,8 @@ export class Stream {
if (isWsConnected) {
// There is connection to openvidu-server. The RTCPeerConnection is the only one broken
logger.log(
`[${event}] Trying to reconnect stream ${this.streamId} (${this.isLocal() ? 'Publisher' : 'Subscriber'
`[${event}] Trying to reconnect stream ${this.streamId} (${
this.isLocal() ? 'Publisher' : 'Subscriber'
}) and the websocket is opened`
);
if (this.isLocal()) {
@ -1661,7 +1676,8 @@ export class Stream {
} else {
// There is no connection to openvidu-server. Nothing can be done. The automatic reconnection
// feature should handle a possible reconnection of RTCPeerConnection in case network comes back
const errorMsg = `[${event}] Trying to reconnect stream ${this.streamId} (${this.isLocal() ? 'Publisher' : 'Subscriber'
const errorMsg = `[${event}] Trying to reconnect stream ${this.streamId} (${
this.isLocal() ? 'Publisher' : 'Subscriber'
}) but the websocket wasn't opened`;
logger.error(errorMsg);
throw Error(errorMsg);

View File

@ -7,13 +7,9 @@
"allowJs": true,
"allowSyntheticDefaultImports": true,
"emitBOM": false,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"lib": [
"dom",
"es2015.promise",
"es5",
"scripthost"
],
"lib": ["dom", "es2015", "scripthost"],
"module": "commonjs",
"noFallthroughCasesInSwitch": true,
//"noImplicitAny": true,
@ -28,8 +24,6 @@
"skipLibCheck": true,
"sourceMap": true,
"strictNullChecks": true,
"suppressExcessPropertyErrors": true,
"suppressImplicitAnyIndexErrors": true,
"target": "es5"
"target": "es2015"
}
}

View File

@ -56,6 +56,6 @@ export class ConnectionEvent extends Event {
/**
* @hidden
*/
// tslint:disable-next-line:no-empty
callDefaultBehavior() {}
}

View File

@ -63,6 +63,6 @@ export class ConnectionPropertyChangedEvent extends Event {
/**
* @hidden
*/
// tslint:disable-next-line:no-empty
callDefaultBehavior() {}
}

View File

@ -71,7 +71,6 @@ export abstract class Event {
* by calling {@link Subscriber.createVideoElement}). For every video removed, the Subscriber object will also dispatch a `videoElementDestroyed` event.
*/
preventDefault() {
// tslint:disable-next-line:no-empty
this.callDefaultBehavior = () => {};
this.hasBeenPrevented = true;
}

View File

@ -87,7 +87,7 @@ export enum ExceptionEventName {
*
* {@link ExceptionEvent} objects with this {@link ExceptionEvent.name} will have as {@link ExceptionEvent.origin} property a {@link Session} object.
*/
SPEECH_TO_TEXT_DISCONNECTED = 'SPEECH_TO_TEXT_DISCONNECTED',
SPEECH_TO_TEXT_DISCONNECTED = 'SPEECH_TO_TEXT_DISCONNECTED'
}
/**
@ -131,6 +131,6 @@ export class ExceptionEvent extends Event {
/**
* @hidden
*/
// tslint:disable-next-line:no-empty
callDefaultBehavior() {}
}

View File

@ -38,6 +38,6 @@ export class FilterEvent extends Event {
/**
* @hidden
*/
// tslint:disable-next-line:no-empty
callDefaultBehavior() {}
}

View File

@ -51,6 +51,6 @@ export class NetworkQualityLevelChangedEvent extends Event {
/**
* @hidden
*/
// tslint:disable-next-line:no-empty
callDefaultBehavior() {}
}

View File

@ -49,6 +49,6 @@ export class PublisherSpeakingEvent extends Event {
/**
* @hidden
*/
// tslint:disable-next-line:no-empty
callDefaultBehavior() {}
}

View File

@ -66,6 +66,6 @@ export class RecordingEvent extends Event {
/**
* @hidden
*/
// tslint:disable-next-line:no-empty
callDefaultBehavior() {}
}

View File

@ -59,6 +59,6 @@ export class SignalEvent extends Event {
/**
* @hidden
*/
// tslint:disable-next-line:no-empty
callDefaultBehavior() {}
}

View File

@ -24,7 +24,6 @@ import { SpeechToTextEventReason } from './Types/Types';
* Triggered by {@link SessionEventMap.speechToTextMessage}
*/
export class SpeechToTextEvent extends Event {
/**
* The {@link Connection} owning the Stream that produced the speech-to-text event.
* In other words, this is the participant that spoke and produced this transcription event.
@ -67,6 +66,6 @@ export class SpeechToTextEvent extends Event {
/**
* @hidden
*/
// tslint:disable-next-line:no-empty
callDefaultBehavior() {}
}

View File

@ -44,6 +44,6 @@ export class StreamManagerEvent extends Event {
/**
* @hidden
*/
// tslint:disable-next-line:no-empty
callDefaultBehavior() {}
}

View File

@ -78,6 +78,6 @@ export class StreamPropertyChangedEvent extends Event {
/**
* @hidden
*/
// tslint:disable-next-line:no-empty
callDefaultBehavior() {}
}

View File

@ -1,42 +1,26 @@
export type ChangedPropertyType =
'videoActive' |
'audioActive' |
'videoTrack' |
'audioTrack' |
'videoDimensions' |
'filter';
export type ChangedPropertyType = 'videoActive' | 'audioActive' | 'videoTrack' | 'audioTrack' | 'videoDimensions' | 'filter';
export type StreamPropertyChangedEventReason =
'publishVideo' |
'publishAudio' |
'trackReplaced' |
'deviceRotated' |
'screenResized' |
'applyFilter' |
'execFilterMethod' |
'removeFilter';
| 'publishVideo'
| 'publishAudio'
| 'trackReplaced'
| 'deviceRotated'
| 'screenResized'
| 'applyFilter'
| 'execFilterMethod'
| 'removeFilter';
export type ConnectionEventReason =
'disconnect' |
'forceDisconnectByUser' |
'forceDisconnectByServer' |
'sessionClosedByServer' |
'networkDisconnect' |
'nodeCrashed' |
'';
| 'disconnect'
| 'forceDisconnectByUser'
| 'forceDisconnectByServer'
| 'sessionClosedByServer'
| 'networkDisconnect'
| 'nodeCrashed'
| '';
export type StreamEventReason =
ConnectionEventReason |
'unpublish' |
'forceUnpublishByUser' |
'forceUnpublishByServer';
export type StreamEventReason = ConnectionEventReason | 'unpublish' | 'forceUnpublishByUser' | 'forceUnpublishByServer';
export type RecordingEventReason =
'recordingStoppedByServer' |
'sessionClosedByServer' |
'automaticStop' |
'nodeCrashed';
export type RecordingEventReason = 'recordingStoppedByServer' | 'sessionClosedByServer' | 'automaticStop' | 'nodeCrashed';
export type SpeechToTextEventReason =
'recognizing' |
'recognized';
export type SpeechToTextEventReason = 'recognizing' | 'recognized';

View File

@ -40,6 +40,6 @@ export class VideoElementEvent extends Event {
/**
* @hidden
*/
// tslint:disable-next-line:no-empty
callDefaultBehavior() {}
}

View File

@ -32,10 +32,10 @@ export class ConsoleLogger {
constructor(console: Console) {
this.logger = console;
(this.log = console.log),
((this.log = console.log),
(this.info = console.info),
(this.debug = console.debug),
(this.warn = console.warn),
(this.error = console.error);
(this.error = console.error));
}
}

View File

@ -182,8 +182,6 @@ export class PlatformUtils {
);
}
/**
* @hidden
*/

View File

@ -16,7 +16,7 @@
*/
import freeice = require('freeice');
import { v4 as uuidv4 } from 'uuid';
import { v4 as uuid } from 'uuid';
import { TypeOfVideo } from '../Enums/TypeOfVideo';
import { ExceptionEventName } from '../Events/ExceptionEvent';
import { OpenViduLogger } from '../Logger/OpenViduLogger';
@ -391,7 +391,8 @@ export class WebRtcPeer {
offerToReceiveAudio: offerAudio,
offerToReceiveVideo: offerVideo
};
(this.pc as RTCPeerConnection).createAnswer(constraints)
(this.pc as RTCPeerConnection)
.createAnswer(constraints)
.then((sdpAnswer) => resolve(sdpAnswer))
.catch((error) => reject(error));
}
@ -574,7 +575,7 @@ export class WebRtcPeer {
* @hidden
*/
generateUniqueId(): string {
return uuidv4();
return uuid();
}
}

View File

@ -15,8 +15,6 @@
*
*/
// tslint:disable:no-string-literal
import { Stream } from '../../OpenVidu/Stream';
import { OpenViduLogger } from '../Logger/OpenViduLogger';
import { PlatformUtils } from '../Utils/Platform';
@ -108,7 +106,7 @@ export class WebRtcStats {
private readonly STATS_ITEM_NAME = 'webrtc-stats-config';
private webRtcStatsEnabled = false;
private webRtcStatsIntervalId: NodeJS.Timer;
private webRtcStatsIntervalId: ReturnType<typeof setInterval>;
private statsInterval = 1;
private POST_URL: string;
@ -126,8 +124,7 @@ export class WebRtcStats {
// accessing localStorage in a third-party iframe throws a DOMException.
try {
webrtcObj = localStorage.getItem(this.STATS_ITEM_NAME);
}
catch(e){}
} catch (e) {}
if (!!webrtcObj) {
this.webRtcStatsEnabled = true;

View File

@ -7,13 +7,9 @@
"allowJs": true,
"allowSyntheticDefaultImports": true,
"emitBOM": false,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"lib": [
"dom",
"es2015.promise",
"es5",
"scripthost"
],
"lib": ["dom", "es2015", "scripthost"],
"module": "commonjs",
"noFallthroughCasesInSwitch": true,
//"noImplicitAny": true,
@ -29,8 +25,6 @@
"skipLibCheck": true,
"sourceMap": true,
"strictNullChecks": true,
"suppressExcessPropertyErrors": true,
"suppressImplicitAnyIndexErrors": true,
"target": "es5"
"target": "es2015"
}
}

View File

@ -101,7 +101,7 @@ public class OpenViduClient {
public void reconnecting() {
log.warn("JsonRpcWebsocket connection: is reconnecting");
}
}, new SslContextFactory(true)));
}, new SslContextFactory.Client(true)));
}
public OpenViduClient(JsonRpcClient client) {

View File

@ -1,12 +1,12 @@
{
"name": "openvidu-components-testapp",
"version": "2.30.0",
"version": "2.32.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "openvidu-components-testapp",
"version": "2.30.0",
"version": "2.32.1",
"dependencies": {
"@angular/animations": "17.3.10",
"@angular/cdk": "17.3.10",
@ -19,7 +19,7 @@
"@angular/platform-browser-dynamic": "17.3.10",
"@angular/router": "17.3.10",
"autolinker": "4.0.0",
"openvidu-browser": "2.30.0",
"openvidu-browser": "2.32.1",
"rxjs": "7.5.7",
"tslib": "2.3.1",
"zone.js": "^0.14.6"
@ -506,6 +506,7 @@
"version": "17.3.10",
"resolved": "https://registry.npmjs.org/@angular/animations/-/animations-17.3.10.tgz",
"integrity": "sha512-9fR5snTuG4aM2K54TG/6DXcKXMDKZMovZhjQOxO8l68/oqn6fKrHs8DLzckFs0XGRZ+2OyURH8WggFm1Z828rA==",
"peer": true,
"dependencies": {
"tslib": "^2.3.0"
},
@ -520,6 +521,7 @@
"version": "17.3.10",
"resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-17.3.10.tgz",
"integrity": "sha512-b1qktT2c1TTTe5nTji/kFAVW92fULK0YhYAvJ+BjZTPKu2FniZNe8o4qqQ0pUuvtMu+ZQxp/QqFYoidIVCjScg==",
"peer": true,
"dependencies": {
"tslib": "^2.3.0"
},
@ -620,6 +622,7 @@
"version": "17.3.10",
"resolved": "https://registry.npmjs.org/@angular/common/-/common-17.3.10.tgz",
"integrity": "sha512-6SfD21M3LujymmZsZQIxAsV8Bj5u6He6ImZ+p2rr7FAhFxpVJyKldK8LCmJcFsBD4srpQcxEZ0iDxXvg+0ihAw==",
"peer": true,
"dependencies": {
"tslib": "^2.3.0"
},
@ -635,6 +638,7 @@
"version": "17.3.10",
"resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-17.3.10.tgz",
"integrity": "sha512-6Ce4siHyF0fCZBDm/cz+blJByGDu1/hbPkQVGmk5HGZTmCUeKkgyjoM6bZr7ssAsyGDRwxBh2SGHO4Ce31vuPA==",
"peer": true,
"dependencies": {
"tslib": "^2.3.0"
},
@ -655,6 +659,7 @@
"resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-17.3.10.tgz",
"integrity": "sha512-85SBphqRj3szac3FbeYgEZ+I6WaAlo5h7JX06BdjOLLiaoIwlFhLeAuG+jVekseV+95grFUxIsCMphWHi2e6hQ==",
"dev": true,
"peer": true,
"dependencies": {
"@babel/core": "7.23.9",
"@jridgewell/sourcemap-codec": "^1.4.14",
@ -682,6 +687,7 @@
"version": "17.3.10",
"resolved": "https://registry.npmjs.org/@angular/core/-/core-17.3.10.tgz",
"integrity": "sha512-ocEKu7X0yFCOvgJn1uZy76qjhsjKvULrO1k/BuIX0nwhp61DTGYTvCqKmwCBLM8/gvcKYH5vMKMHoQKtiSGE0A==",
"peer": true,
"dependencies": {
"tslib": "^2.3.0"
},
@ -729,6 +735,7 @@
"version": "17.3.10",
"resolved": "https://registry.npmjs.org/@angular/forms/-/forms-17.3.10.tgz",
"integrity": "sha512-0VZWSXDi2M3DAGJlpdV3lo73Yo/73GPRqmfTOrvIoUIenFg5Dz6oNGzvt/1aRkRn6HKccjix6iMpH91EN65pWA==",
"peer": true,
"dependencies": {
"tslib": "^2.3.0"
},
@ -810,6 +817,7 @@
"version": "17.3.10",
"resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-17.3.10.tgz",
"integrity": "sha512-LEhBDOKm2A7nRmZqsafVp6OinRDG1OYZBSqjnT1jZ+f0CRRFIXz6aJ0TMPoU6vq9SLRJ7vrGD9P/eBf2hW00NQ==",
"peer": true,
"dependencies": {
"tslib": "^2.3.0"
},
@ -888,6 +896,7 @@
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.9.tgz",
"integrity": "sha512-5q0175NOjddqpvvzU+kDiSOAk4PfdO6FvwCWoQ6RO7rTzEe8vlo+4HVfcnAREhD4npMs0e9uZypjTwzZPCf/cw==",
"dev": true,
"peer": true,
"dependencies": {
"@ampproject/remapping": "^2.2.0",
"@babel/code-frame": "^7.23.5",
@ -2774,6 +2783,7 @@
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.5.tgz",
"integrity": "sha512-tVQRucExLQ02Boi4vdPp49svNGcfL2GhdTCT9aldhXgCJVAI21EtRfBettiuLUwce/7r6bFdgs6JFkcdTiFttA==",
"dev": true,
"peer": true,
"dependencies": {
"@ampproject/remapping": "^2.2.0",
"@babel/code-frame": "^7.24.2",
@ -5495,6 +5505,7 @@
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.12.tgz",
"integrity": "sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==",
"dev": true,
"peer": true,
"dependencies": {
"undici-types": "~5.26.4"
}
@ -5808,6 +5819,7 @@
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
"integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==",
"dev": true,
"peer": true,
"bin": {
"acorn": "bin/acorn"
},
@ -5890,6 +5902,7 @@
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz",
"integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==",
"dev": true,
"peer": true,
"dependencies": {
"fast-deep-equal": "^3.1.1",
"json-schema-traverse": "^1.0.0",
@ -6582,6 +6595,7 @@
"url": "https://github.com/sponsors/ai"
}
],
"peer": true,
"dependencies": {
"caniuse-lite": "^1.0.30001587",
"electron-to-chromium": "^1.4.668",
@ -7039,6 +7053,7 @@
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
"integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==",
"dev": true,
"peer": true,
"dependencies": {
"tslib": "^1.9.0"
},
@ -7059,13 +7074,15 @@
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
"dev": true
"dev": true,
"peer": true
},
"node_modules/codelyzer/node_modules/zone.js": {
"version": "0.10.3",
"resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.10.3.tgz",
"integrity": "sha512-LXVLVEq0NNOqK/fLJo3d0kfzd4sxwn2/h67/02pjCjfKDxgx1i9QqpvtHD8CrBnSSwMw5+dy11O7FRX5mkO7Cg==",
"dev": true
"dev": true,
"peer": true
},
"node_modules/color-convert": {
"version": "1.9.3",
@ -10923,7 +10940,8 @@
"version": "3.10.1",
"resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.10.1.tgz",
"integrity": "sha512-ooZWSDVAdh79Rrj4/nnfklL3NQVra0BcuhcuWoAwwi+znLDoUeH87AFfeX8s+YeYi6xlv5nveRyaA1v7CintfA==",
"dev": true
"dev": true,
"peer": true
},
"node_modules/jasmine-spec-reporter": {
"version": "7.0.0",
@ -11121,6 +11139,7 @@
"resolved": "https://registry.npmjs.org/karma/-/karma-6.4.3.tgz",
"integrity": "sha512-LuucC/RE92tJ8mlCwqEoRWXP38UMAqpnq98vktmS9SznSoUPPUJQbc91dHcxcunROvfQjdORVA/YFviH+Xci9Q==",
"dev": true,
"peer": true,
"dependencies": {
"@colors/colors": "1.5.0",
"body-parser": "^1.19.0",
@ -11345,6 +11364,7 @@
"resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-4.0.1.tgz",
"integrity": "sha512-h8XDAhTiZjJKzfkoO1laMH+zfNlra+dEQHUAjpn5JV1zCPtOIVWGQjLBrqhnzQa/hrU2XrZwSyBa6XjEBzfXzw==",
"dev": true,
"peer": true,
"dependencies": {
"jasmine-core": "^3.6.0"
},
@ -11579,6 +11599,7 @@
"resolved": "https://registry.npmjs.org/less/-/less-4.2.0.tgz",
"integrity": "sha512-P3b3HJDBtSzsXUl0im2L7gTO5Ubg8mEN6G8qoTS77iXxXX4Hvu4Qj540PZDvQ8V6DmX6iXo98k7Md0Cm1PrLaA==",
"dev": true,
"peer": true,
"dependencies": {
"copy-anything": "^2.0.1",
"parse-node-version": "^1.0.1",
@ -12799,6 +12820,7 @@
"resolved": "https://registry.npmjs.org/ng-packagr/-/ng-packagr-17.3.0.tgz",
"integrity": "sha512-kMSqxeDgv88SWCoapWNRRN1UdBgwu9/Pw/j7u2WFGmzrIWUFivNWBBSSL94kMxr2La+Z9wMwiL8EwKNvmCpg2A==",
"dev": true,
"peer": true,
"dependencies": {
"@rollup/plugin-json": "^6.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
@ -13328,43 +13350,33 @@
}
},
"node_modules/openvidu-browser": {
"version": "2.30.0",
"resolved": "https://registry.npmjs.org/openvidu-browser/-/openvidu-browser-2.30.0.tgz",
"integrity": "sha512-OTtbo3gwdZp1i1I5DNHPRIPSoG7lJawXHXgYTUZ+IFrbXzvoBjJHilskJVLeAeTPcMwPLxJ96JLd+6sS946JWQ==",
"version": "2.32.1",
"resolved": "https://registry.npmjs.org/openvidu-browser/-/openvidu-browser-2.32.1.tgz",
"integrity": "sha512-XNRP5vMveJsbiOhgOP7N5sbRbrWDj1zfVuCvfnUE77ni7zEIb8IEK0pHsGQPCQHqZE5u0cs3hpT+KfxdOEfsfA==",
"license": "Apache-2.0",
"dependencies": {
"events": "3.3.0",
"freeice": "2.2.2",
"hark": "1.2.3",
"inherits": "2.0.4",
"jsnlog": "2.30.0",
"mime": "3.0.0",
"mime": "2.6.0",
"platform": "1.3.6",
"semver": "7.6.2",
"uuid": "9.0.1",
"semver": "7.7.3",
"uuid": "^8.3.2",
"wolfy87-eventemitter": "5.2.9"
}
},
"node_modules/openvidu-browser/node_modules/mime": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz",
"integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==",
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz",
"integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==",
"license": "MIT",
"bin": {
"mime": "cli.js"
},
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/openvidu-browser/node_modules/uuid": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",
"integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",
"funding": [
"https://github.com/sponsors/broofa",
"https://github.com/sponsors/ctavan"
],
"bin": {
"uuid": "dist/bin/uuid"
"node": ">=4.0.0"
}
},
"node_modules/ora": {
@ -14094,6 +14106,7 @@
"url": "https://github.com/sponsors/ai"
}
],
"peer": true,
"dependencies": {
"nanoid": "^3.3.7",
"picocolors": "^1.0.0",
@ -14885,6 +14898,7 @@
"version": "7.5.7",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.7.tgz",
"integrity": "sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==",
"peer": true,
"dependencies": {
"tslib": "^2.1.0"
}
@ -14946,6 +14960,7 @@
"resolved": "https://registry.npmjs.org/sass/-/sass-1.71.1.tgz",
"integrity": "sha512-wovtnV2PxzteLlfNzbgm1tFXPLoZILYAMJtvoXXkD7/+1uP41eKkIt1ypWq5/q2uT94qHjXehEYfmjKOvjL9sg==",
"dev": true,
"peer": true,
"dependencies": {
"chokidar": ">=3.0.0 <4.0.0",
"immutable": "^4.0.0",
@ -15072,9 +15087,10 @@
}
},
"node_modules/semver": {
"version": "7.6.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
"integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
"version": "7.7.3",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
"integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
"license": "ISC",
"bin": {
"semver": "bin/semver.js"
},
@ -16102,6 +16118,7 @@
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
"integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
"dev": true,
"peer": true,
"dependencies": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
@ -16390,7 +16407,8 @@
"node_modules/tslib": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==",
"peer": true
},
"node_modules/tslint": {
"version": "6.1.3",
@ -16398,6 +16416,7 @@
"integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==",
"deprecated": "TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.",
"dev": true,
"peer": true,
"dependencies": {
"@babel/code-frame": "^7.0.0",
"builtin-modules": "^1.1.1",
@ -16686,6 +16705,7 @@
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz",
"integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==",
"dev": true,
"peer": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@ -16950,7 +16970,6 @@
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"dev": true,
"bin": {
"uuid": "dist/bin/uuid"
}
@ -17002,6 +17021,7 @@
"resolved": "https://registry.npmjs.org/vite/-/vite-5.1.7.tgz",
"integrity": "sha512-sgnEEFTZYMui/sTlH1/XEnVNHMujOahPLGMxn1+5sIT45Xjng1Ec1K78jRP15dSmVgg5WBin9yO81j3o9OxofA==",
"dev": true,
"peer": true,
"dependencies": {
"esbuild": "^0.19.3",
"postcss": "^8.4.35",
@ -17503,6 +17523,7 @@
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.90.3.tgz",
"integrity": "sha512-h6uDYlWCctQRuXBs1oYpVe6sFcWedl0dpcVaTf/YF67J9bKvwJajFulMVSYKHrksMB3I/pIagRzDxwxkebuzKA==",
"dev": true,
"peer": true,
"dependencies": {
"@types/eslint-scope": "^3.7.3",
"@types/estree": "^1.0.5",
@ -17646,6 +17667,7 @@
"resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.1.tgz",
"integrity": "sha512-5hbAst3h3C3L8w6W4P96L5vaV0PxSmJhxZvWKYIdgxOQm8pNZ5dEOmmSLBVpP85ReeyRt6AS1QJNyo/oFFPeVA==",
"dev": true,
"peer": true,
"dependencies": {
"@types/bonjour": "^3.5.9",
"@types/connect-history-api-fallback": "^1.3.5",
@ -17781,6 +17803,7 @@
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
"integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
"dev": true,
"peer": true,
"dependencies": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
@ -18284,7 +18307,8 @@
"node_modules/zone.js": {
"version": "0.14.6",
"resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.14.6.tgz",
"integrity": "sha512-vyRNFqofdaHVdWAy7v3Bzmn84a1JHWSjpuTZROT/uYn8I3p2cmo7Ro9twFmYRQDPhiYOV7QLk0hhY4JJQVqS6Q=="
"integrity": "sha512-vyRNFqofdaHVdWAy7v3Bzmn84a1JHWSjpuTZROT/uYn8I3p2cmo7Ro9twFmYRQDPhiYOV7QLk0hhY4JJQVqS6Q==",
"peer": true
}
}
}

View File

@ -11,7 +11,7 @@
"@angular/platform-browser-dynamic": "17.3.10",
"@angular/router": "17.3.10",
"autolinker": "4.0.0",
"openvidu-browser": "2.30.0",
"openvidu-browser": "2.32.1",
"rxjs": "7.5.7",
"tslib": "2.3.1",
"zone.js": "^0.14.6"
@ -78,5 +78,5 @@
"webcomponent:e2e-pro-ci": "cross-env LAUNCH_MODE=CI npm run webcomponent:e2e-pro",
"webcomponent:serve-testapp": "npx http-server ./e2e/webcomponent-app/ && echo http://localhost:8080/?OV_URL=https://localhost:4443&OV_SECRET=MY_SECRET&prejoin=false"
},
"version": "2.30.0"
"version": "2.32.1"
}

View File

@ -1,12 +1,12 @@
{
"name": "openvidu-angular",
"version": "2.30.0",
"version": "2.32.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "openvidu-angular",
"version": "2.30.0",
"version": "2.32.1",
"dependencies": {
"tslib": "^2.3.0"
},

View File

@ -12,7 +12,7 @@
"@angular/material": "^16.0.0 || ^17.0.0",
"autolinker": "^4.0.0",
"buffer": "^6.0.3",
"openvidu-browser": "2.30.0"
"openvidu-browser": "2.32.1"
},
"version": "2.30.0"
"version": "2.32.1"
}

View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>io.openvidu</groupId>
<artifactId>openvidu-java-client</artifactId>
<version>2.32.1</version>
<name>OpenVidu Java Client</name>
<description>OpenVidu client for your Java backend: get sessionId's and tokens easily from your OpenVidu server</description>
<url>https://openvidu.io</url>
<licenses>
<license>
<name>Apache 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>openvidu.io</id>
<name>-openvidu.io Community</name>
<organization>openvidu.io</organization>
<organizationUrl>https://openvidu.io</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/OpenVidu/openvidu.git</connection>
<developerConnection>scm:git:git@github.com:OpenVidu/openvidu.git</developerConnection>
<tag>develop</tag>
<url>https://github.com/OpenVidu/openvidu.git</url>
</scm>
<dependencies>
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>5.4.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.13.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.17</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.10.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

View File

@ -10,7 +10,7 @@
</parent>
<artifactId>openvidu-java-client</artifactId>
<version>2.30.0</version>
<version>2.32.1</version>
<packaging>jar</packaging>
<name>OpenVidu Java Client</name>
@ -48,7 +48,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.release>${java.version}</maven.compiler.release>
</properties>
<distributionManagement>
@ -66,38 +66,36 @@
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>5.1.4</version>
<version>5.4.4</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10</version>
<!-- The below dependency cannot be declared as ${version.gson} because
openvidu-java-client must be self-contained to be used as an external dependency
outside from this multi-module project. The version number must be EXACTLY
the same as in the parent pom.xml nonetheless -->
<version>2.13.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.36</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.9.1</version>
<scope>test</scope>
<!-- The below dependency cannot be declared as ${version.slf4j} because
openvidu-java-client must be self-contained to be used as an external dependency
outside from this multi-module project. The version number must be EXACTLY
the same as in the parent pom.xml nonetheless -->
<version>2.0.17</version>
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.7</version>
<version>1.10.0</version>
</dependency>
<!--
This dependency is used by commons-validator 1.7. But it should be
replaced or updated in the future:
https://issues.apache.org/jira/browse/VALIDATOR-485?jql=project%20%3D%20VALIDATOR%20AND%20fixVersion%20%3D%202.0
-->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.4</version>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.14.1</version>
<scope>test</scope>
</dependency>
</dependencies>
@ -185,17 +183,40 @@
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${version.nexus.staging.plugin}</version>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>${version.sonatype.central.plugin}</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<stagingProgressTimeoutMinutes>30</stagingProgressTimeoutMinutes>
<publishingServerId>ossrh</publishingServerId>
<autoPublish>true</autoPublish>
</configuration>
</plugin>
<!-- Add this in the default profile's plugins section -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.6.0</version>
<configuration>
<flattenMode>ossrh</flattenMode>
</configuration>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

View File

@ -0,0 +1,16 @@
package io.openvidu.java.client;
import java.lang.reflect.Type;
import java.util.Map;
import com.google.gson.reflect.TypeToken;
public final class GsonTypes {
public static final Type STRING_OBJECT_MAP = new TypeToken<Map<String, Object>>() {
}.getType();
private GsonTypes() {
// Utility class
}
}

View File

@ -19,7 +19,7 @@ package io.openvidu.java.client;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.security.KeyManagementException;
import java.security.KeyStoreException;
@ -32,7 +32,6 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
import javax.net.ssl.SSLContext;
@ -41,6 +40,7 @@ import org.apache.hc.client5.http.auth.UsernamePasswordCredentials;
import org.apache.hc.client5.http.classic.methods.HttpDelete;
import org.apache.hc.client5.http.classic.methods.HttpGet;
import org.apache.hc.client5.http.classic.methods.HttpPost;
import org.apache.hc.client5.http.config.ConnectionConfig;
import org.apache.hc.client5.http.config.RequestConfig;
import org.apache.hc.client5.http.impl.auth.BasicCredentialsProvider;
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
@ -48,9 +48,9 @@ import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;
import org.apache.hc.client5.http.impl.classic.HttpClients;
import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder;
import org.apache.hc.client5.http.io.HttpClientConnectionManager;
import org.apache.hc.client5.http.ssl.DefaultClientTlsStrategy;
import org.apache.hc.client5.http.ssl.HostnameVerificationPolicy;
import org.apache.hc.client5.http.ssl.NoopHostnameVerifier;
import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory;
import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactoryBuilder;
import org.apache.hc.core5.http.ClassicHttpResponse;
import org.apache.hc.core5.http.HttpEntity;
import org.apache.hc.core5.http.HttpException;
@ -63,6 +63,7 @@ import org.apache.hc.core5.http.io.entity.StringEntity;
import org.apache.hc.core5.ssl.SSLContextBuilder;
import org.apache.hc.core5.ssl.TrustStrategy;
import org.apache.hc.core5.util.TimeValue;
import org.apache.hc.core5.util.Timeout;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -121,14 +122,17 @@ public class OpenVidu {
} catch (KeyManagementException | NoSuchAlgorithmException | KeyStoreException e) {
throw new RuntimeException(e);
}
final SSLConnectionSocketFactory sslSocketFactory = SSLConnectionSocketFactoryBuilder.create()
.setHostnameVerifier(NoopHostnameVerifier.INSTANCE).setSslContext(sslContext).build();
final DefaultClientTlsStrategy tlsStrategy = new DefaultClientTlsStrategy(sslContext,
HostnameVerificationPolicy.CLIENT, NoopHostnameVerifier.INSTANCE);
final ConnectionConfig connectionConfig = ConnectionConfig.custom().setConnectTimeout(Timeout.ofSeconds(30))
.setTimeToLive(TimeValue.ofSeconds(30)).build();
final HttpClientConnectionManager connectionManager = PoolingHttpClientConnectionManagerBuilder.create()
.setSSLSocketFactory(sslSocketFactory).setConnectionTimeToLive(TimeValue.ofSeconds(30)).build();
.setTlsSocketStrategy(tlsStrategy).setDefaultConnectionConfig(connectionConfig).build();
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(30, TimeUnit.SECONDS)
.setConnectionRequestTimeout(30, TimeUnit.SECONDS).setResponseTimeout(30, TimeUnit.SECONDS).build();
RequestConfig requestConfig = RequestConfig.custom().setConnectionRequestTimeout(Timeout.ofSeconds(30))
.setResponseTimeout(Timeout.ofSeconds(30)).build();
this.httpClient = HttpClients.custom().setConnectionManager(connectionManager)
.setDefaultRequestConfig(requestConfig).setDefaultCredentialsProvider(credentialsProvider).build();
@ -836,8 +840,8 @@ public class OpenVidu {
private void testHostname(String hostnameStr) {
try {
new URL(hostnameStr);
} catch (MalformedURLException e) {
URI.create(hostnameStr).toURL();
} catch (IllegalArgumentException | MalformedURLException e) {
throw new RuntimeException("The hostname \"" + hostnameStr + "\" is not a valid URL: " + e.getMessage());
}
}

View File

@ -123,8 +123,8 @@ public class Recording {
}
this.status = Recording.Status.valueOf(json.get("status").getAsString());
RecordingProperties.Builder builder = RecordingProperties
.fromJson(new Gson().fromJson(json.toString(), Map.class), null);
Map<String, Object> recordingProps = new Gson().fromJson(json.toString(), GsonTypes.STRING_OBJECT_MAP);
RecordingProperties.Builder builder = RecordingProperties.fromJson(recordingProps, null);
this.recordingProperties = builder.build();
}

View File

@ -544,6 +544,7 @@ public class RecordingProperties {
Boolean ignoreFailedStreamsParam;
try {
@SuppressWarnings("unused")
String session = (String) params.get("session");
nameParam = (String) params.get("name");
hasAudioParam = (Boolean) params.get("hasAudio");

View File

@ -727,8 +727,8 @@ public class Session {
.recordingMode(RecordingMode.valueOf(json.get("recordingMode").getAsString()));
if (json.has("defaultRecordingProperties")) {
String jsonString = json.get("defaultRecordingProperties").getAsJsonObject().toString();
RecordingProperties.Builder recBuilder = RecordingProperties
.fromJson(new Gson().fromJson(jsonString, Map.class), null);
Map<String, Object> recordingProps = new Gson().fromJson(jsonString, GsonTypes.STRING_OBJECT_MAP);
RecordingProperties.Builder recBuilder = RecordingProperties.fromJson(recordingProps, null);
builder.defaultRecordingProperties(recBuilder.build());
}
if (json.has("customSessionId")) {

View File

@ -17,14 +17,12 @@
package io.openvidu.java.client;
import java.lang.reflect.Type;
import java.util.Map;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.JsonPrimitive;
import com.google.gson.reflect.TypeToken;
/**
* See {@link io.openvidu.java.client.OpenVidu#createSession(SessionProperties)}
@ -376,8 +374,8 @@ public class SessionProperties {
JsonObject defaultRecordingPropertiesJson = null;
if (params.get("defaultRecordingProperties") != null) {
try {
defaultRecordingPropertiesJson = new Gson()
.toJsonTree(params.get("defaultRecordingProperties"), Map.class).getAsJsonObject();
defaultRecordingPropertiesJson = new Gson().toJsonTree(params.get("defaultRecordingProperties"),
GsonTypes.STRING_OBJECT_MAP).getAsJsonObject();
} catch (Exception e) {
throw new IllegalArgumentException(
"Error in parameter 'defaultRecordingProperties'. It is not a valid JSON object");
@ -386,8 +384,9 @@ public class SessionProperties {
if (defaultRecordingPropertiesJson != null) {
try {
String jsonString = defaultRecordingPropertiesJson.toString();
RecordingProperties.Builder recBuilder = RecordingProperties
.fromJson(new Gson().fromJson(jsonString, Map.class), null);
Map<String, Object> recordingProps = new Gson().fromJson(jsonString,
GsonTypes.STRING_OBJECT_MAP);
RecordingProperties.Builder recBuilder = RecordingProperties.fromJson(recordingProps, null);
RecordingProperties defaultRecordingProperties = recBuilder.build();
builder = builder.defaultRecordingProperties(defaultRecordingProperties);
} catch (Exception e) {
@ -419,9 +418,7 @@ public class SessionProperties {
} catch (Exception e) {
try {
Gson gson = new Gson();
Type gsonType = new TypeToken<Map>() {
}.getType();
String gsonString = gson.toJson(params.get("mediaNode"), gsonType);
String gsonString = gson.toJson(params.get("mediaNode"), GsonTypes.STRING_OBJECT_MAP);
mediaNodeJson = JsonParser.parseString(gsonString).getAsJsonObject();
} catch (Exception e2) {
throw new IllegalArgumentException("Error in parameter 'mediaNode'. It is not a valid JSON object");

View File

@ -24,6 +24,7 @@ import com.google.gson.JsonObject;
* @deprecated Use {@link io.openvidu.java.client.ConnectionProperties
* ConnectionProperties} instead
*/
@Deprecated
public class TokenOptions {
private OpenViduRole role;
@ -34,6 +35,7 @@ public class TokenOptions {
* @deprecated Use {@link io.openvidu.java.client.ConnectionProperties.Builder
* ConnectionProperties.Builder} instead
*/
@Deprecated
public static class Builder {
private OpenViduRole role = OpenViduRole.PUBLISHER;

View File

@ -9,6 +9,7 @@ import com.google.gson.Gson;
import com.google.gson.JsonObject;
import io.openvidu.java.client.ConnectionProperties;
import io.openvidu.java.client.GsonTypes;
public class ConnectionPropertiesTest {
@ -96,7 +97,7 @@ public class ConnectionPropertiesTest {
}
private Map<String, ?> mapFromJsonString(String json) {
return new Gson().fromJson(json, Map.class);
return new Gson().fromJson(json, GsonTypes.STRING_OBJECT_MAP);
}
private void assertException(Map<String, ?> params, String containsError) {

View File

@ -18,8 +18,9 @@ import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuil
import org.apache.hc.client5.http.impl.routing.DefaultProxyRoutePlanner;
import org.apache.hc.client5.http.io.HttpClientConnectionManager;
import org.apache.hc.client5.http.protocol.HttpClientContext;
import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory;
import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactoryBuilder;
import org.apache.hc.client5.http.ssl.DefaultClientTlsStrategy;
import org.apache.hc.client5.http.ssl.HostnameVerificationPolicy;
import org.apache.hc.client5.http.ssl.NoopHostnameVerifier;
import org.apache.hc.core5.http.HttpHeaders;
import org.apache.hc.core5.http.HttpHost;
import org.apache.hc.core5.http.message.BasicHeader;
@ -35,7 +36,7 @@ public class OpenViduConstructorTest {
RuntimeException thrown = Assertions.assertThrows(RuntimeException.class, () -> {
new OpenVidu("WRONG_URL", "MY_SECRET");
});
Assertions.assertEquals("The hostname \"WRONG_URL\" is not a valid URL: no protocol: WRONG_URL",
Assertions.assertEquals("The hostname \"WRONG_URL\" is not a valid URL: URI is not absolute",
thrown.getMessage());
}
@ -70,16 +71,17 @@ public class OpenViduConstructorTest {
builder.setRoutePlanner(routePlanner);
// Custom SSLContext
SSLContext sslContext = null;
SSLContext sslContext;
try {
sslContext = SSLContext.getInstance("TLSv1.2");
sslContext.init(null, null, null);
} catch (Exception e) {
throw new RuntimeException(e);
}
final SSLConnectionSocketFactory sslSocketFactory = SSLConnectionSocketFactoryBuilder.create()
.setSslContext(sslContext).build();
final DefaultClientTlsStrategy tlsStrategy = new DefaultClientTlsStrategy(sslContext,
HostnameVerificationPolicy.CLIENT, NoopHostnameVerifier.INSTANCE);
final HttpClientConnectionManager connectionManager = PoolingHttpClientConnectionManagerBuilder.create()
.setSSLSocketFactory(sslSocketFactory).build();
.setTlsSocketStrategy(tlsStrategy).build();
builder.setConnectionManager(connectionManager);
// Custom CredentialsProvider

View File

@ -10,6 +10,7 @@ import com.google.gson.JsonObject;
import io.openvidu.java.client.Recording.OutputMode;
import io.openvidu.java.client.RecordingProperties;
import io.openvidu.java.client.GsonTypes;
public class RecordingPropertiesTest {
@ -137,7 +138,7 @@ public class RecordingPropertiesTest {
}
private Map<String, ?> mapFromJsonString(String json) {
return new Gson().fromJson(json, Map.class);
return new Gson().fromJson(json, GsonTypes.STRING_OBJECT_MAP);
}
private <T extends Exception> void assertException(Map<String, ?> params, String containsError,

View File

@ -12,6 +12,7 @@ import com.google.gson.Gson;
import com.google.gson.JsonObject;
import io.openvidu.java.client.SessionProperties;
import io.openvidu.java.client.GsonTypes;
public class SessionPropertiesTest {
@ -39,7 +40,7 @@ public class SessionPropertiesTest {
}
private Map<String, ?> mapFromJsonString(String json) {
return new Gson().fromJson(json, Map.class);
return new Gson().fromJson(json, GsonTypes.STRING_OBJECT_MAP);
}
private void assertException(Map<String, ?> params, String containsError) {

View File

@ -0,0 +1,4 @@
node_modules
lib
coverage
dist

View File

@ -0,0 +1,8 @@
{
"printWidth": 120,
"tabWidth": 4,
"singleQuote": true,
"trailingComma": "none",
"semi": true,
"arrowParens": "avoid"
}

View File

@ -5,8 +5,7 @@
[![][OpenViduLogo]](https://openvidu.io)
openvidu-node-client
===
# openvidu-node-client
- **Description**: Library for your NODE server. It is a fully compatible and simple alternative to the REST API exposed by OpenVidu Server.

View File

@ -1,81 +1,37 @@
{
"extends": "tslint:recommended",
"rules": {
"array-type": [
true,
"array"
],
"array-type": [true, "array"],
"ban-types": {
"options": [
[
"Object",
"Avoid using the `Object` type. Did you mean `object`?"
],
["Object", "Avoid using the `Object` type. Did you mean `object`?"],
[
"Function",
"Avoid using the `Function` type. Prefer a specific function type, like `() => void`, or use `ts.AnyFunction`."
],
[
"Boolean",
"Avoid using the `Boolean` type. Did you mean `boolean`?"
],
[
"Number",
"Avoid using the `Number` type. Did you mean `number`?"
],
[
"String",
"Avoid using the `String` type. Did you mean `string`?"
]
["Boolean", "Avoid using the `Boolean` type. Did you mean `boolean`?"],
["Number", "Avoid using the `Number` type. Did you mean `number`?"],
["String", "Avoid using the `String` type. Did you mean `string`?"]
]
},
"class-name": true,
"comment-format": [
true,
"check-space"
],
"curly": [
true,
"ignore-same-line"
],
"indent": [
true,
"spaces",
2
],
"interface-name": [
true,
"never-prefix"
],
"comment-format": [true, "check-space"],
"curly": [true, "ignore-same-line"],
"indent": [true, "spaces", 2],
"interface-name": [true, "never-prefix"],
"interface-over-type-literal": true,
"jsdoc-format": true,
"no-inferrable-types": true,
"no-internal-module": true,
"no-null-keyword": false,
"no-switch-case-fall-through": true,
"no-trailing-whitespace": [
true,
"ignore-template-strings"
],
"no-trailing-whitespace": [true, "ignore-template-strings"],
"no-var-keyword": true,
"object-literal-shorthand": true,
"one-line": [
true,
"check-open-brace",
"check-whitespace"
],
"one-line": [true, "check-open-brace", "check-whitespace"],
"prefer-const": true,
"quotemark": [
true,
"single",
"avoid-escape",
"avoid-template"
],
"semicolon": [
true,
"always",
"ignore-bound-class-methods"
],
"quotemark": [true, "single", "avoid-escape", "avoid-template"],
"semicolon": [true, "always", "ignore-bound-class-methods"],
"space-within-parens": true,
"triple-equals": true,
"typedef-whitespace": [
@ -95,29 +51,10 @@
"variable-declaration": "onespace"
}
],
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-module",
"check-separator",
"check-type"
],
"no-implicit-dependencies": [
true,
"dev"
],
"object-literal-key-quotes": [
true,
"consistent-as-needed"
],
"variable-name": [
true,
"ban-keywords",
"check-format",
"allow-leading-underscore"
],
"whitespace": [true, "check-branch", "check-decl", "check-operator", "check-module", "check-separator", "check-type"],
"no-implicit-dependencies": [true, "dev"],
"object-literal-key-quotes": [true, "consistent-as-needed"],
"variable-name": [true, "ban-keywords", "check-format", "allow-leading-underscore"],
"arrow-parens": false,
"arrow-return-shorthand": false,
"forin": false,

View File

@ -1,22 +1,17 @@
module.exports = {
lib: [
"lib.dom.d.ts",
"lib.es5.d.ts",
"lib.es2015.promise.d.ts",
"lib.scripthost.d.ts"
],
mode: "file",
module: "commonjs",
name: "OpenVidu Node Client",
target: "es5",
externalPattern: "node_modules",
lib: ['lib.dom.d.ts', 'lib.es5.d.ts', 'lib.es2015.promise.d.ts', 'lib.scripthost.d.ts'],
mode: 'file',
module: 'commonjs',
name: 'OpenVidu Node Client',
target: 'es5',
externalPattern: 'node_modules',
excludeExternals: true,
excludePrivate: true,
excludeProtected: true,
excludeNotExported: true,
theme: "default",
readme: "none",
theme: 'default',
readme: 'none',
includeVersion: true,
listInvalidSymbolLinks: true,
out: "./docs"
}
out: './docs'
};

View File

@ -0,0 +1,90 @@
import importPlugin from 'eslint-plugin-import';
import jsdoc from 'eslint-plugin-jsdoc';
import tseslint from 'typescript-eslint';
export default tseslint.config(
{
ignores: ['lib/**', 'node_modules/**']
},
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
{
files: ['src/**/*.ts'],
languageOptions: {
parser: tseslint.parser
},
plugins: {
'@typescript-eslint': tseslint.plugin,
import: importPlugin,
jsdoc
},
settings: {
jsdoc: {
mode: 'typescript'
},
'import/resolver': {
typescript: {
project: ['./tsconfig.json']
}
}
},
rules: {
'@typescript-eslint/array-type': ['error', { default: 'array-simple', readonly: 'array-simple' }],
'@typescript-eslint/no-restricted-types': [
'error',
{
types: {
Object: {
message: 'Avoid using the `Object` type. Did you mean `object`?'
},
Function: {
message: 'Avoid using the `Function` type. Prefer a specific function type, like `() => void`.'
},
Boolean: {
message: 'Avoid using the `Boolean` type. Did you mean `boolean`?'
},
Number: {
message: 'Avoid using the `Number` type. Did you mean `number`?'
},
String: {
message: 'Avoid using the `String` type. Did you mean `string`?'
}
}
}
],
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
'@typescript-eslint/consistent-indexed-object-style': 'off',
'@typescript-eslint/consistent-type-assertions': 'off',
'@typescript-eslint/no-duplicate-enum-values': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' }
],
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'interface',
format: ['PascalCase'],
custom: {
regex: '^I[A-Z]',
match: false
}
}
],
'dot-notation': 'error',
semi: ['error', 'always'],
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
'jsdoc/check-alignment': 'off',
'jsdoc/check-indentation': 'off',
'no-trailing-spaces': ['error', { skipBlankLines: false, ignoreComments: false }],
'no-var': 'off',
'prefer-rest-params': 'off',
'prefer-const': 'off',
quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: true }]
}
}
);

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +1,22 @@
{
"author": "OpenVidu",
"dependencies": {
"axios": "1.7.1",
"axios": "1.13.2",
"buffer": "6.0.3"
},
"description": "OpenVidu Node Client",
"devDependencies": {
"@types/node": "20.12.12",
"@eslint/js": "9.39.1",
"@types/node": "24.10.1",
"eslint": "9.39.1",
"eslint-import-resolver-typescript": "4.4.4",
"eslint-plugin-import": "2.32.0",
"eslint-plugin-jsdoc": "61.3.0",
"prettier": "3.6.2",
"ts-node": "10.9.2",
"tslint": "6.1.3",
"typedoc": "0.25.13",
"typescript": "5.4.5"
"typedoc": "0.28.14",
"typescript": "5.9.3",
"typescript-eslint": "8.47.0"
},
"license": "Apache-2.0",
"main": "lib/index.js",
@ -20,9 +26,11 @@
"url": "git://github.com/OpenVidu/openvidu"
},
"scripts": {
"build": "./node_modules/typescript/bin/tsc",
"docs": "./generate-docs.sh"
"build": "npm run lint && npm run beautify && ./node_modules/typescript/bin/tsc",
"docs": "./generate-docs.sh",
"lint": "eslint \"src/**/*.ts\"",
"beautify": "prettier --write ."
},
"typings": "lib/index.d.ts",
"version": "2.30.0"
"version": "2.32.1"
}

View File

@ -162,7 +162,7 @@ export class Connection {
json.publishers.forEach((jsonPublisher) => {
const publisherObj: Publisher = new Publisher(jsonPublisher);
fetchedPublisherIds.push(publisherObj.streamId);
let storedPublisher = this.publishers.find((c) => c.streamId === publisherObj.streamId);
const storedPublisher = this.publishers.find((c) => c.streamId === publisherObj.streamId);
if (!!storedPublisher) {
// 2. Update existing Publisher
@ -174,7 +174,7 @@ export class Connection {
});
// 4. Remove closed Publishers from local collection
for (var i = this.publishers.length - 1; i >= 0; --i) {
for (let i = this.publishers.length - 1; i >= 0; --i) {
if (!fetchedPublisherIds.includes(this.publishers[i].streamId)) {
this.publishers.splice(i, 1);
}
@ -194,7 +194,7 @@ export class Connection {
});
// 3. Remove closed Subscribers from local collection
for (var i = this.subscribers.length - 1; i >= 0; --i) {
for (let i = this.subscribers.length - 1; i >= 0; --i) {
if (!fetchedSubscriberIds.includes(this.subscribers[i])) {
this.subscribers.splice(i, 1);
}

View File

@ -20,7 +20,7 @@ export class OpenViduLogger {
*/
log(...args: any[]) {
if (!this.isProdMode) {
this.defaultConsoleLogger.log.apply(this.defaultConsoleLogger.logger, arguments);
this.defaultConsoleLogger.log.apply(this.defaultConsoleLogger.logger, args);
}
}
@ -29,7 +29,7 @@ export class OpenViduLogger {
*/
debug(...args: any[]) {
if (!this.isProdMode) {
this.defaultConsoleLogger.debug.apply(this.defaultConsoleLogger.logger, arguments);
this.defaultConsoleLogger.debug.apply(this.defaultConsoleLogger.logger, args);
}
}
@ -38,7 +38,7 @@ export class OpenViduLogger {
*/
info(...args: any[]) {
if (!this.isProdMode) {
this.defaultConsoleLogger.info.apply(this.defaultConsoleLogger.logger, arguments);
this.defaultConsoleLogger.info.apply(this.defaultConsoleLogger.logger, args);
}
}
@ -46,14 +46,14 @@ export class OpenViduLogger {
* @hidden
*/
warn(...args: any[]) {
this.defaultConsoleLogger.warn.apply(this.defaultConsoleLogger.logger, arguments);
this.defaultConsoleLogger.warn.apply(this.defaultConsoleLogger.logger, args);
}
/**
* @hidden
*/
error(...args: any[]) {
this.defaultConsoleLogger.error.apply(this.defaultConsoleLogger.logger, arguments);
this.defaultConsoleLogger.error.apply(this.defaultConsoleLogger.logger, args);
}
enableProdMode() {

View File

@ -114,7 +114,10 @@ export class OpenVidu {
*
* @param secret Secret configured in your OpenVidu deployment
*/
constructor(private hostname: string, secret: string) {
constructor(
private hostname: string,
secret: string
) {
this.setHostnameAndPort();
this.basicAuth = this.getBasicAuth(secret);
}
@ -136,7 +139,7 @@ export class OpenVidu {
const session = new Session(this, properties);
session
.getSessionHttp()
.then((response) => {
.then((_response) => {
this.activeSessions.push(session);
resolve(session);
})
@ -542,7 +545,7 @@ export class OpenVidu {
res.data.content.forEach((jsonSession) => {
const fetchedSession: Session = new Session(this, jsonSession);
fetchedSessionIds.push(fetchedSession.sessionId);
let storedSession = this.activeSessions.find((s) => s.sessionId === fetchedSession.sessionId);
const storedSession = this.activeSessions.find((s) => s.sessionId === fetchedSession.sessionId);
if (!!storedSession) {
// 2. Update existing Session
@ -559,8 +562,8 @@ export class OpenVidu {
});
// 4. Remove closed sessions from local collection
for (var i = this.activeSessions.length - 1; i >= 0; --i) {
let sessionId = this.activeSessions[i].sessionId;
for (let i = this.activeSessions.length - 1; i >= 0; --i) {
const sessionId = this.activeSessions[i].sessionId;
if (!fetchedSessionIds.includes(sessionId)) {
logger.log("Removing closed session '" + sessionId + "'");
hasChanged = true;
@ -587,7 +590,7 @@ export class OpenVidu {
* @returns A map paring every existing sessionId with true or false depending on whether it has changed or not
*/
fetchWebRtc(): Promise<any> {
// tslint:disable:no-string-literal
/* eslint-disable dot-notation */
const addWebRtcStatsToConnections = (connection: Connection, connectionsExtendedInfo: any) => {
const connectionExtended = connectionsExtendedInfo.find((c) => c.connectionId === connection.connectionId);
if (!!connectionExtended) {
@ -679,7 +682,7 @@ export class OpenVidu {
addWebRtcStatsToConnections(connection, jsonSession.connections.content);
});
fetchedSessionIds.push(fetchedSession.sessionId);
let storedSession = this.activeSessions.find((s) => s.sessionId === fetchedSession.sessionId);
const storedSession = this.activeSessions.find((s) => s.sessionId === fetchedSession.sessionId);
if (!!storedSession) {
// 2. Update existing Session
@ -713,8 +716,8 @@ export class OpenVidu {
});
// 4. Remove closed sessions from local collection
for (var i = this.activeSessions.length - 1; i >= 0; --i) {
let sessionId = this.activeSessions[i].sessionId;
for (let i = this.activeSessions.length - 1; i >= 0; --i) {
const sessionId = this.activeSessions[i].sessionId;
if (!fetchedSessionIds.includes(sessionId)) {
logger.log("Removing closed session '" + sessionId + "'");
sessionChanges[sessionId] = true;
@ -736,7 +739,7 @@ export class OpenVidu {
});
});
}
// tslint:enable:no-string-literal
/* eslint-enable dot-notation */
/**
* Disable all logging except error level

View File

@ -62,7 +62,7 @@ export class Recording {
*/
properties: RecordingProperties;
/* tslint:disable:no-string-literal */
/* eslint-disable dot-notation */
/**
* @hidden
*/
@ -105,7 +105,7 @@ export class Recording {
: Recording.DefaultRecordingPropertiesValues.ignoreFailedStreams;
}
}
/* tslint:enable:no-string-literal */
/* eslint-enable dot-notation */
}
export namespace Recording {

View File

@ -85,7 +85,10 @@ export class Session {
/**
* @hidden
*/
constructor(private ov: OpenVidu, propertiesOrJson?) {
constructor(
private ov: OpenVidu,
propertiesOrJson?
) {
if (!!propertiesOrJson) {
// Defined parameter
if (!!propertiesOrJson.sessionId) {
@ -315,11 +318,11 @@ export class Session {
connectionClosed.publishers.forEach((publisher) => {
this.connections.forEach((con) => {
con.subscribers = con.subscribers.filter((subscriber) => {
// tslint:disable:no-string-literal
/* eslint-disable dot-notation */
if (!!subscriber['streamId']) {
// Subscriber with advanced webRtc configuration properties
return subscriber['streamId'] !== publisher.streamId;
// tslint:enable:no-string-literal
/* eslint-enable dot-notation */
} else {
// Regular string subscribers
return subscriber !== publisher.streamId;
@ -381,11 +384,11 @@ export class Session {
connection.publishers = connection.publishers.filter((pub) => pub.streamId !== streamId);
// Try to remove the Publisher from the Connection subscribers collection
if (!!connection.subscribers && connection.subscribers.length > 0) {
// tslint:disable:no-string-literal
/* eslint-disable dot-notation */
if (!!connection.subscribers[0]['streamId']) {
// Subscriber with advanced webRtc configuration properties
connection.subscribers = connection.subscribers.filter((sub) => sub['streamId'] !== streamId);
// tslint:enable:no-string-literal
/* eslint-enable dot-notation */
} else {
// Regular string subscribers
connection.subscribers = connection.subscribers.filter((sub) => sub !== streamId);
@ -570,7 +573,7 @@ export class Session {
json.connections.content.forEach((jsonConnection) => {
const connectionObj: Connection = new Connection(jsonConnection);
fetchedConnectionIds.push(connectionObj.connectionId);
let storedConnection = this.connections.find((c) => c.connectionId === connectionObj.connectionId);
const storedConnection = this.connections.find((c) => c.connectionId === connectionObj.connectionId);
if (!!storedConnection) {
// 2. Update existing Connection
@ -582,7 +585,7 @@ export class Session {
});
// 4. Remove closed sessions from local collection
for (var i = this.connections.length - 1; i >= 0; --i) {
for (let i = this.connections.length - 1; i >= 0; --i) {
if (!fetchedConnectionIds.includes(this.connections[i].connectionId)) {
this.connections.splice(i, 1);
}

View File

@ -9,19 +9,9 @@
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"typeRoots": ["node_modules/@types"],
"types": ["node"],
"lib": [
"es2016",
"dom"
]
"lib": ["es2016", "dom"]
},
"exclude": [
"config",
"docs",
"lib",
"node_modules"
]
"exclude": ["config", "docs", "lib", "node_modules"]
}

View File

@ -234,7 +234,7 @@ Resources:
#!/bin/bash
while true; do
HTTP_STATUS=$(curl -Ik http://localhost:5443 | head -n1 | awk '{print $2}')
if [ $HTTP_STATUS == 200 ]; then
if [ $HTTP_STATUS == 401 ]; then
break
fi
sleep 5
@ -355,7 +355,7 @@ Resources:
BlockDeviceMappings:
- DeviceName: /dev/sda1
Ebs:
VolumeType: gp2
VolumeType: gp3
DeleteOnTermination: true
VolumeSize: 200
@ -501,11 +501,11 @@ Resources:
# Get original ami name
public_ami_filter = [{ 'Name': 'image-id', 'Values': [ source_image_id ] }]
response = ec2_client_ov.describe_images(Filters=public_ami_filter)
response = ec2_client_ov.describe_images(IncludeDeprecated=True, Filters=public_ami_filter)
new_ami_name= "[ OpenVidu CE AMI Copy ] - " + response['Images'][0]['Name']
own_ami_filter = [{ 'Name': 'name', 'Values': [new_ami_name] }]
response = ec2_client.describe_images(Filters=own_ami_filter)
response = ec2_client.describe_images(IncludeDeprecated=True, Filters=own_ami_filter)
if (len(response['Images']) == 1):
# If AMI exists, don't copy
new_images.append(response['Images'][0]['ImageId'])
@ -535,7 +535,7 @@ Resources:
Handler: index.handler
Role:
!GetAtt CloudformationLambdaRole.Arn
Runtime: python3.11
Runtime: python3.13
Timeout: 900
CloudformationLambdaInvoke:

View File

@ -88,14 +88,14 @@ Resources:
IMAGES="$(cat docker-compose.yml | grep 'image: openvidu/' | cut -d':' -f2 | sed -e 's/^[[:space:]]*//')"
for IMG in $IMAGES
do
sed -i "s|$IMG.*|$IMG:master|g" docker-compose.yml
sed -i "s|$IMG.*|$IMG:master-v2|g" docker-compose.yml
done
# docker-compose.override.yml replace with master version
IMAGES="$(cat docker-compose.override.yml | grep 'image: openvidu/' | cut -d':' -f2 | sed -e 's/^[[:space:]]*//')"
for IMG in $IMAGES
do
sed -i "s|$IMG.*|$IMG:master|g" docker-compose.override.yml
sed -i "s|$IMG.*|$IMG:master-v2|g" docker-compose.override.yml
done
popd
@ -159,15 +159,22 @@ Resources:
- Key: Name
Value: !Ref AWS::StackName
KeyName: AWS_KEY_NAME
BlockDeviceMappings:
- DeviceName: /dev/sda1
Ebs:
VolumeType: gp3
DeleteOnTermination: true
VolumeSize: 12
UserData:
"Fn::Base64":
!Sub |
#!/bin/bash -x
set -eu -o pipefail
apt-get update && apt-get install -y \
python3-setuptools \
python3-pip \
ec2-instance-connect
pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz
pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz --break-system-packages
cfn-init --region ${AWS::Region} --stack ${AWS::StackId} --resource OpenviduServerCE

View File

@ -17,7 +17,7 @@ TEMPJSON=$(mktemp -t cloudformation-XXX --suffix .json)
getUbuntuAmiId() {
local AMI_ID=$(
aws --region ${1} ec2 describe-images \
--filters "Name=name,Values=*ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*" \
--filters "Name=name,Values=*ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-*" \
"Name=owner-alias,Values=amazon" \
--query "sort_by(Images, &CreationDate)" |
jq -r '.[-1].ImageId'
@ -54,7 +54,7 @@ TEMPLATE_URL=https://s3-eu-west-1.amazonaws.com/aws.openvidu.io/cfn-mkt-ov-ce-am
if [[ ${UPDATE_S3_FILES} == "true" ]]; then
# Avoid overriding existing versions
# Only master and non existing versions can be overriden
if [[ ${OPENVIDU_VERSION} != "master" ]]; then
if [[ ${OPENVIDU_VERSION} != "master-v2" ]]; then
INSTALL_SCRIPT_EXISTS=true
aws s3api head-object --bucket aws.openvidu.io --key install_openvidu_$OPENVIDU_VERSION.sh || INSTALL_SCRIPT_EXISTS=false
if [[ ${INSTALL_SCRIPT_EXISTS} == "true" ]]; then
@ -112,7 +112,7 @@ sed -i "s/OPENVIDU_VERSION/${OPENVIDU_VERSION}/g" CF-OpenVidu-${OPENVIDU_VERSION
if [[ ${UPDATE_S3_FILES} == "true" ]]; then
# Avoid overriding existing versions
# Only master and non existing versions can be overriden
if [[ ${OPENVIDU_VERSION} != "master" ]]; then
if [[ ${OPENVIDU_VERSION} != "master-v2" ]]; then
CF_EXIST=true
aws s3api head-object --bucket aws.openvidu.io --key CF-OpenVidu-${OPENVIDU_VERSION}.yaml || CF_EXIST=false
if [[ ${CF_EXIST} == "true" ]]; then

View File

@ -176,7 +176,7 @@ OPENVIDU_CDR_PATH=/opt/openvidu/cdr
# --------------------------
# Docker hub kurento media server: https://hub.docker.com/r/kurento/kurento-media-server
# Uncomment the next line and define this variable with KMS image that you want use
# KMS_IMAGE=kurento/kurento-media-server:7.0.1
# KMS_IMAGE=kurento/kurento-media-server:7.3.0
# Kurento Media Server Level logs
# -------------------------------

View File

@ -9,11 +9,11 @@ services:
#
# Default Application
#
# Openvidu-Call Version: 2.30.0
# Openvidu-Call Version: 2.32.1
#
# --------------------------------------------------------------
app:
image: openvidu/openvidu-call:2.30.0
image: openvidu/openvidu-call:2.32.1
restart: on-failure
network_mode: host
environment:

View File

@ -11,7 +11,7 @@
#
# This file will be overridden when update OpenVidu Platform
#
# Openvidu Version: 2.30.0
# Openvidu Version: 2.32.1
#
# Installation Mode: On Premises
#
@ -22,7 +22,7 @@ version: '3.1'
services:
openvidu-server:
image: openvidu/openvidu-server:2.30.0
image: openvidu/openvidu-server:2.32.1
restart: on-failure
network_mode: host
entrypoint: ['/usr/local/bin/entrypoint.sh']
@ -45,11 +45,14 @@ services:
max-size: "${DOCKER_LOGS_MAX_SIZE:-100M}"
kms:
image: ${KMS_IMAGE:-kurento/kurento-media-server:7.0.1}
image: ${KMS_IMAGE:-kurento/kurento-media-server:7.3.0}
restart: always
network_mode: host
ulimits:
core: -1
nofile:
soft: 65536
hard: 65536
volumes:
- /opt/openvidu/kms-crashes:/opt/openvidu/kms-crashes
- ${OPENVIDU_RECORDING_PATH}:${OPENVIDU_RECORDING_PATH}
@ -65,7 +68,7 @@ services:
max-size: "${DOCKER_LOGS_MAX_SIZE:-100M}"
coturn:
image: openvidu/openvidu-coturn:2.30.0
image: openvidu/openvidu-coturn:2.32.1
restart: on-failure
ports:
- "${COTURN_PORT:-3478}:${COTURN_PORT:-3478}/tcp"
@ -89,7 +92,7 @@ services:
max-size: "${DOCKER_LOGS_MAX_SIZE:-100M}"
nginx:
image: openvidu/openvidu-proxy:2.30.0
image: openvidu/openvidu-proxy:2.32.1
restart: always
network_mode: host
volumes:

View File

@ -2,8 +2,8 @@
# Global variables
OPENVIDU_FOLDER=openvidu
OPENVIDU_VERSION=master
OPENVIDU_UPGRADABLE_VERSION="2.30"
OPENVIDU_VERSION=v2.32.1
OPENVIDU_UPGRADABLE_VERSION="2.32"
DOWNLOAD_URL=https://raw.githubusercontent.com/OpenVidu/openvidu/${OPENVIDU_VERSION}
# Support docker compose v1 and v2

View File

@ -9,11 +9,11 @@ services:
#
# Default Application
#
# Openvidu-Call Version: 2.30.0
# Openvidu-Call Version: 2.32.1
#
# --------------------------------------------------------------
app:
image: openvidu/openvidu-call:2.30.0
image: openvidu/openvidu-call:2.32.1
restart: on-failure
ports:
- 5442:5442

View File

@ -8,7 +8,7 @@
#
# This file will be overridden when updating OpenVidu Enterprise HA
#
# Openvidu Version: 2.30.0
# Openvidu Version: 2.32.1
#
# Installation Mode: On Premises
#
@ -18,7 +18,7 @@ version: '3.1'
services:
loadbalancer:
image: openvidu/openvidu-proxy:2.30.0
image: openvidu/openvidu-proxy:2.32.1
restart: always
volumes:
- ./certificates:/etc/letsencrypt
@ -55,7 +55,7 @@ services:
max-size: "${DOCKER_LOGS_MAX_SIZE:-100M}"
minio-s3:
image: minio/minio:RELEASE.2023-01-06T18-11-18Z
image: minio/minio:RELEASE.2025-09-07T16-13-09Z
restart: always
environment:
- MINIO_ACCESS_KEY=${OPENVIDU_ENTERPRISE_HA_S3_CONFIG_ACCESS_KEY}
@ -73,21 +73,25 @@ services:
max-size: "${DOCKER_LOGS_MAX_SIZE:-100M}"
createbuckets:
image: minio/mc:RELEASE.2022-12-24T15-21-38Z
image: minio/mc:RELEASE.2025-08-13T08-35-41Z
depends_on:
- minio-s3
restart: on-failure
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host add openvidu-minio \
until /usr/bin/mc alias set openvidu-minio \
http://minio-s3:9000 \
'${OPENVIDU_ENTERPRISE_HA_S3_CONFIG_ACCESS_KEY}' \
'${OPENVIDU_ENTERPRISE_HA_S3_CONFIG_SECRET_KEY}';
'${OPENVIDU_ENTERPRISE_HA_S3_CONFIG_SECRET_KEY}'; do
echo 'Waiting for MinIO to be ready...';
sleep 2;
done;
/usr/bin/mc mb 'openvidu-minio/${OPENVIDU_ENTERPRISE_HA_S3_CONFIG_BUCKET}';
exit 0;
"
redis:
image: redis:7.0.8-alpine
image: redis:8.2.3-alpine
restart: always
ports:
- "${OPENVIDU_ENTERPRISE_HA_REDIS_PORT:-6379}:${OPENVIDU_ENTERPRISE_HA_REDIS_PORT:-6379}"
@ -100,7 +104,7 @@ services:
max-size: "${DOCKER_LOGS_MAX_SIZE:-100M}"
elasticsearch:
image: openvidu/openvidu-elasticsearch:7.8.0
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.29
restart: always
environment:
- discovery.type=single-node
@ -120,7 +124,7 @@ services:
max-size: "${DOCKER_LOGS_MAX_SIZE:-100M}"
kibana:
image: docker.elastic.co/kibana/kibana:7.8.0
image: docker.elastic.co/kibana/kibana:7.17.29
restart: always
environment:
- SERVER_BASEPATH="/kibana"

View File

@ -3,8 +3,8 @@
# Global variables
OPENVIDU_FOLDER=ov-enterprise-base-services
ELASTICSEARCH_FOLDER=${OPENVIDU_FOLDER}/elasticsearch
OPENVIDU_VERSION=master
OPENVIDU_UPGRADABLE_VERSION="2.30"
OPENVIDU_VERSION=v2.32.1
OPENVIDU_UPGRADABLE_VERSION="2.32"
DOWNLOAD_URL=https://raw.githubusercontent.com/OpenVidu/openvidu/${OPENVIDU_VERSION}
# Support docker compose v1 and v2

View File

@ -319,7 +319,7 @@ OPENVIDU_CDR_PATH=/opt/openvidu/cdr
# Uncomment the next line and define this variable with KMS image that you want use
# By default, KMS_IMAGE is defined in media nodes and it does not need to be specified unless
# you want to use a specific version of KMS
# KMS_IMAGE=kurento/kurento-media-server:6.18.0
# KMS_IMAGE=kurento/kurento-media-server:7.3.0
# Uncomment the next line and define this variable to change
# the verbosity level of the logs of KMS

View File

@ -8,7 +8,7 @@
#
# This file will be overridden when update OpenVidu Enterprise HA Node
#
# Openvidu Version: 2.30.0
# Openvidu Version: 2.32.1
#
# Installation Mode: On Premises
#
@ -19,7 +19,7 @@ version: '3.1'
services:
openvidu-server:
image: openvidu/openvidu-server-pro:2.30.0
image: openvidu/openvidu-server-pro:2.32.1
container_name: openvidu-server
restart: on-failure
network_mode: host
@ -66,7 +66,7 @@ services:
max-size: "${DOCKER_LOGS_MAX_SIZE:-100M}"
replication-manager:
image: openvidu/replication-manager-on-prem:2.30.0
image: openvidu/replication-manager-on-prem:2.32.1
container_name: replication-manager
restart: always
network_mode: host
@ -101,7 +101,7 @@ services:
max-size: "${DOCKER_LOGS_MAX_SIZE:-100M}"
coturn:
image: openvidu/openvidu-coturn:2.30.0
image: openvidu/openvidu-coturn:2.32.1
restart: on-failure
env_file:
- .env
@ -128,19 +128,22 @@ services:
max-size: "${DOCKER_LOGS_MAX_SIZE:-100M}"
media-node-controller:
image: openvidu/media-node-controller:2.30.0
image: openvidu/media-node-controller:2.32.1
restart: always
ulimits:
core: -1
nofile:
soft: 65536
hard: 65536
environment:
- MEDIA_NODE_CONTROLLER_RECORDINGS_PATH=/opt/openvidu/mncontroller/recordings
- KMS_IMAGE=kurento/kurento-media-server:7.0.1
- MEDIASOUP_IMAGE=openvidu/mediasoup-controller:2.30.0
- METRICBEAT_IMAGE=docker.elastic.co/beats/metricbeat-oss:7.8.0
- FILEBEAT_IMAGE=docker.elastic.co/beats/filebeat-oss:7.8.0
- OPENVIDU_RECORDING_IMAGE=openvidu/openvidu-recording:2.30.0
- COTURN_IMAGE=openvidu/openvidu-coturn:2.30.0
- SPEECH_TO_TEXT_IMAGE=openvidu/speech-to-text-service:2.30.0
- KMS_IMAGE=kurento/kurento-media-server:7.3.0
- MEDIASOUP_IMAGE=openvidu/mediasoup-controller:2.32.1
- METRICBEAT_IMAGE=docker.elastic.co/beats/metricbeat-oss:7.12.1
- FILEBEAT_IMAGE=docker.elastic.co/beats/filebeat-oss:7.12.1
- OPENVIDU_RECORDING_IMAGE=openvidu/openvidu-recording:2.32.1
- COTURN_IMAGE=openvidu/openvidu-coturn:2.32.1
- SPEECH_TO_TEXT_IMAGE=openvidu/speech-to-text-service:2.32.1
- NO_COLOR=true
ports:
- 3000:3000

View File

@ -2,8 +2,8 @@
# Global variables
OPENVIDU_FOLDER=openvidu
OPENVIDU_VERSION=master
OPENVIDU_UPGRADABLE_VERSION="2.30"
OPENVIDU_VERSION=v2.32.1
OPENVIDU_UPGRADABLE_VERSION="2.32"
BEATS_FOLDER=${OPENVIDU_FOLDER}/beats
DOWNLOAD_URL=https://raw.githubusercontent.com/OpenVidu/openvidu/${OPENVIDU_VERSION}
IMAGES_MEDIA_NODE_CONTROLLER=(

View File

@ -242,7 +242,7 @@ check_env_var_is_value() {
start_openvidu() {
export INITIAL_CONFIG_SYNC=true
if ! docker-compose up --exit-code-from replication-manager replication-manager; then
if ! docker-compose run replication-manager; then
printf "\n ERROR: Openvidu Node failed to start"
printf "\n"
unset INITIAL_CONFIG_SYNC

View File

@ -744,7 +744,7 @@ Resources:
BlockDeviceMappings:
- DeviceName: /dev/sda1
Ebs:
VolumeType: gp2
VolumeType: gp3
DeleteOnTermination: true
VolumeSize: 50
@ -898,9 +898,9 @@ Resources:
Port: 4443
Protocol: HTTP
Matcher:
HttpCode: '200'
HttpCode: '401-403'
HealthCheckIntervalSeconds: 10
HealthCheckPath: /openvidu/health
HealthCheckPath: /
HealthCheckProtocol: HTTP
HealthCheckPort: '4443'
HealthCheckTimeoutSeconds: 5
@ -1005,7 +1005,7 @@ Resources:
BlockDeviceMappings:
- DeviceName: /dev/sda1
Ebs:
VolumeType: gp2
VolumeType: gp3
DeleteOnTermination: true
VolumeSize: 100
UserData:
@ -1284,7 +1284,7 @@ Resources:
Handler: index.handler
Role:
!GetAtt LambdaOnDeleteRole.Arn
Runtime: python3.11
Runtime: python3.13
Timeout: 900
LambdaOnDeleteInvoke:
@ -1353,7 +1353,7 @@ Resources:
def copy_ami_operation(source_image_id, source_region, new_ami_name, ec2_client):
own_ami_filter = [{ 'Name': 'name', 'Values': [new_ami_name] }]
amis_response = ec2_client.describe_images(Filters=own_ami_filter)
amis_response = ec2_client.describe_images(IncludeDeprecated=True, Filters=own_ami_filter)
if (len(amis_response['Images']) == 1):
# If AMI exists, don't copy
return amis_response['Images'][0]['ImageId']
@ -1384,9 +1384,9 @@ Resources:
public_ami_master_node_filter = [{ 'Name': 'image-id', 'Values': [ source_image_id_master_node ] }]
public_ami_media_node_filter = [{ 'Name': 'image-id', 'Values': [ source_image_id_media_node ] }]
response = ec2_client_ov.describe_images(Filters=public_ami_master_node_filter)
response = ec2_client_ov.describe_images(IncludeDeprecated=True, Filters=public_ami_master_node_filter)
new_ami_name_master_node = "[ OpenVidu ENTERPRISE Master Node AMI Copy ] - " + response['Images'][0]['Name']
response = ec2_client_ov.describe_images(Filters=public_ami_media_node_filter)
response = ec2_client_ov.describe_images(IncludeDeprecated=True, Filters=public_ami_media_node_filter)
new_ami_name_media_node = "[ OpenVidu PRO/ENTERPRISE Media Node AMI Copy ] - " + response['Images'][0]['Name']
# Copy master node AMI and media node AMI
@ -1408,7 +1408,7 @@ Resources:
Handler: index.handler
Role:
!GetAtt LambdaOnCreateRole.Arn
Runtime: python3.11
Runtime: python3.13
Timeout: 900
LambdaOnCreateInvoke:

View File

@ -89,7 +89,7 @@ Resources:
IMAGES="$(cat docker-compose.yml | grep 'image: openvidu/' | cut -d':' -f2 | sed -e 's/^[[:space:]]*//')"
for IMG in $IMAGES
do
sed -i "s|image: $IMG:.*|image: $IMG:master|g" docker-compose.yml
sed -i "s|image: $IMG:.*|image: $IMG:master-v2|g" docker-compose.yml
done
# docker-compose.override.yml replace with master version
@ -97,7 +97,7 @@ Resources:
IMAGES="$(cat docker-compose.override.yml | grep 'image: openvidu/' | cut -d':' -f2 | sed -e 's/^[[:space:]]*//')"
for IMG in $IMAGES
do
sed -i "s|image: $IMG:.*|image: $IMG:master|g" docker-compose.override.yml
sed -i "s|image: $IMG:.*|image: $IMG:master-v2|g" docker-compose.override.yml
done
fi
@ -192,6 +192,7 @@ Resources:
fi
sed -i "s|#OPENVIDU_PRO_RECORDING_STORAGE=|OPENVIDU_PRO_RECORDING_STORAGE=s3|" $WORKINGDIR/.env
sed -i "s|#OPENVIDU_PRO_AWS_S3_BUCKET=|OPENVIDU_PRO_AWS_S3_BUCKET=${OPENVIDU_PRO_CONFIG_S3_BUCKET}/recordings|" $WORKINGDIR/.env
sed -i "s|#OPENVIDU_PRO_AWS_REGION=|OPENVIDU_PRO_AWS_REGION=${AWS_REGION}|" $WORKINGDIR/.env
# Deploy Coturn in media nodes
OPENVIDU_PRO_COTURN_IN_MEDIA_NODES=$(echo ${ASG_DATA} | grep -Po "(OPENVIDU_PRO_COTURN_IN_MEDIA_NODES=).+?(?=\s*(\||$))" | cut -d"=" -f2)
@ -254,18 +255,19 @@ Resources:
BlockDeviceMappings:
- DeviceName: /dev/sda1
Ebs:
VolumeType: gp2
VolumeType: gp3
DeleteOnTermination: true
VolumeSize: 10
VolumeSize: 12
UserData:
"Fn::Base64":
!Sub |
#!/bin/bash -x
set -eu -o pipefail
apt-get update && apt-get install -y \
python3-setuptools \
python3-pip \
ec2-instance-connect
pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz
pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz --break-system-packages
cfn-init --region ${AWS::Region} --stack ${AWS::StackId} --resource OpenviduServerPro

View File

@ -18,7 +18,7 @@ TEMPJSON=$(mktemp -t cloudformation-XXX --suffix .json)
getUbuntuAmiId() {
local AMI_ID=$(
aws --region ${1} ec2 describe-images \
--filters "Name=name,Values=*ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*" \
--filters "Name=name,Values=*ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-*" \
"Name=owner-alias,Values=amazon" \
--query "sort_by(Images, &CreationDate)" |
jq -r '.[-1].ImageId'
@ -56,7 +56,7 @@ TEMPLATE_URL=https://s3-eu-west-1.amazonaws.com/aws.openvidu.io/cfn-crete-ov-aws
if [[ ${UPDATE_S3_FILES} == "true" ]]; then
# Avoid overriding existing versions
# Only master and non existing versions can be overriden
if [[ ${OPENVIDU_PRO_VERSION} != "master" ]]; then
if [[ ${OPENVIDU_PRO_VERSION} != "master-v2" ]]; then
INSTALL_SCRIPT_EXISTS=true
aws s3api head-object --bucket aws.openvidu.io --key install_openvidu_enterprise_master_node_$OPENVIDU_PRO_VERSION.sh || INSTALL_SCRIPT_EXISTS=false
if [[ ${INSTALL_SCRIPT_EXISTS} == "true" ]]; then
@ -121,7 +121,7 @@ sed -i "s/KMS_AMI_ID/${KMS_AMI_ID}/g" CF-OpenVidu-Enterprise-${OPENVIDU_PRO_VERS
if [[ ${UPDATE_S3_FILES} == "true" ]]; then
# Avoid overriding existing versions
# Only master and non existing versions can be overriden
if [[ ${OPENVIDU_PRO_VERSION} != "master" ]]; then
if [[ ${OPENVIDU_PRO_VERSION} != "master-v2" ]]; then
CF_EXIST=true
aws s3api head-object --bucket aws.openvidu.io --key CF-OpenVidu-Enterprise-${OPENVIDU_PRO_VERSION}.yaml || CF_EXIST=false
if [[ ${CF_EXIST} == "true" ]]; then

View File

@ -1229,7 +1229,7 @@ Resources:
Handler: index.handler
Role:
!GetAtt LambdaOnDeleteRole.Arn
Runtime: python3.11
Runtime: python3.13
Timeout: 900
LambdaOnDeleteInvoke:
@ -1298,7 +1298,7 @@ Resources:
def copy_ami_operation(source_image_id, source_region, new_ami_name, ec2_client):
own_ami_filter = [{ 'Name': 'name', 'Values': [new_ami_name] }]
amis_response = ec2_client.describe_images(Filters=own_ami_filter)
amis_response = ec2_client.describe_images(IncludeDeprecated=True, Filters=own_ami_filter)
if (len(amis_response['Images']) == 1):
# If AMI exists, don't copy
return amis_response['Images'][0]['ImageId']
@ -1329,9 +1329,9 @@ Resources:
public_ami_master_node_filter = [{ 'Name': 'image-id', 'Values': [ source_image_id_master_node ] }]
public_ami_media_node_filter = [{ 'Name': 'image-id', 'Values': [ source_image_id_media_node ] }]
response = ec2_client_ov.describe_images(Filters=public_ami_master_node_filter)
response = ec2_client_ov.describe_images(IncludeDeprecated=True, Filters=public_ami_master_node_filter)
new_ami_name_master_node = "[ OpenVidu ENTERPRISE Master Node AMI Copy ] - " + response['Images'][0]['Name']
response = ec2_client_ov.describe_images(Filters=public_ami_media_node_filter)
response = ec2_client_ov.describe_images(IncludeDeprecated=True, Filters=public_ami_media_node_filter)
new_ami_name_media_node = "[ OpenVidu PRO/ENTERPRISE Media Node AMI Copy ] - " + response['Images'][0]['Name']
# Copy master node AMI and media node AMI
@ -1353,7 +1353,7 @@ Resources:
Handler: index.handler
Role:
!GetAtt LambdaOnCreateRole.Arn
Runtime: python3.11
Runtime: python3.13
Timeout: 900
LambdaOnCreateInvoke:

View File

@ -80,8 +80,8 @@ Resources:
# Install openvidu-pro
cd /opt
if [[ "OPENVIDU_VERSION" == "master" ]]; then
curl https://raw.githubusercontent.com/OpenVidu/openvidu/master/openvidu-server/deployments/enterprise/docker-compose/install_openvidu_enterprise_master_node.sh | bash
if [[ "OPENVIDU_VERSION" == "master-v2" ]]; then
curl https://raw.githubusercontent.com/OpenVidu/openvidu/v2/openvidu-server/deployments/enterprise/docker-compose/install_openvidu_enterprise_master_node.sh | bash
else
curl https://raw.githubusercontent.com/OpenVidu/openvidu/vOPENVIDU_VERSION/openvidu-server/deployments/enterprise/docker-compose/install_openvidu_enterprise_master_node.sh | bash
fi
@ -93,7 +93,7 @@ Resources:
IMAGES="$(cat docker-compose.yml | grep 'image: openvidu/' | cut -d':' -f2 | sed -e 's/^[[:space:]]*//')"
for IMG in $IMAGES
do
sed -i "s|image: $IMG:.*|image: $IMG:master|g" docker-compose.yml
sed -i "s|image: $IMG:.*|image: $IMG:master-v2|g" docker-compose.yml
done
# docker-compose.override.yml replace with master version
@ -101,7 +101,7 @@ Resources:
IMAGES="$(cat docker-compose.override.yml | grep 'image: openvidu/' | cut -d':' -f2 | sed -e 's/^[[:space:]]*//')"
for IMG in $IMAGES
do
sed -i "s|image: $IMG:.*|image: $IMG:master|g" docker-compose.override.yml
sed -i "s|image: $IMG:.*|image: $IMG:master-v2|g" docker-compose.override.yml
done
fi
@ -251,18 +251,19 @@ Resources:
BlockDeviceMappings:
- DeviceName: /dev/sda1
Ebs:
VolumeType: gp2
VolumeType: gp3
DeleteOnTermination: true
VolumeSize: 10
VolumeSize: 12
UserData:
"Fn::Base64":
!Sub |
#!/bin/bash -x
set -eu -o pipefail
apt-get update && apt-get install -y \
python3-setuptools \
python3-pip \
ec2-instance-connect
pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz
pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz --break-system-packages
cfn-init --region ${AWS::Region} --stack ${AWS::StackId} --resource OpenviduServerPro

View File

@ -17,7 +17,7 @@ TEMPJSON=$(mktemp -t cloudformation-XXX --suffix .json)
getUbuntuAmiId() {
local AMI_ID=$(
aws --region ${1} ec2 describe-images \
--filters "Name=name,Values=*ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*" \
--filters "Name=name,Values=*ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-*" \
"Name=owner-alias,Values=amazon" \
--query "sort_by(Images, &CreationDate)" |
jq -r '.[-1].ImageId'

View File

@ -47,7 +47,7 @@ TEMP_JSON_ES_EBS_OPT=$(mktemp -t es-ebs-XXX --suffix .json)
cat > "$TEMP_JSON_ES_EBS_OPT"<<EOF
{
"EBSEnabled": true,
"VolumeType": "gp2",
"VolumeType": "gp3",
"VolumeSize": 10
}
EOF

View File

@ -379,7 +379,7 @@ ELASTICSEARCH_PASSWORD=
# Uncomment the next line and define this variable with KMS image that you want use
# By default, KMS_IMAGE is defined in media nodes and it does not need to be specified unless
# you want to use a specific version of KMS
# KMS_IMAGE=kurento/kurento-media-server:7.0.1
# KMS_IMAGE=kurento/kurento-media-server:7.3.0
# Uncomment the next line and define this variable to change
# the verbosity level of the logs of KMS
@ -399,6 +399,13 @@ ELASTICSEARCH_PASSWORD=
# - https://docs.openvidu.io/en/stable/deployment/pro/on-premises/#coturn-configuration
OPENVIDU_PRO_COTURN_IN_MEDIA_NODES=false
# TURN traffic through internal network
# --------------------------
# Wether to route TURN traffic through the internal network
# Default value is COTURN_INTERNAL_RELAY=true
COTURN_INTERNAL_RELAY=true
# Private Docker registries for custom images
# --------------------------
# By default OpenVidu PRO/Enterprise uses the public Docker Hub registry to pull the images,

View File

@ -50,7 +50,7 @@ docker run --rm amazon/aws-cli:${AWS_CLI_DOCKER_TAG} ec2 run-instances \
--subnet-id ${AWS_SUBNET_ID} \
--tag-specifications "ResourceType=instance,Tags=[{Key='Name',Value='Media Node'},{Key='ov-cluster-member',Value='kms'},{Key='ov-stack-name',Value='${AWS_STACK_NAME}'},{Key='ov-stack-region',Value='${AWS_DEFAULT_REGION}'}]" \
--iam-instance-profile Name="OpenViduInstanceProfile-${AWS_STACK_NAME}-${AWS_DEFAULT_REGION}" \
--block-device-mappings "DeviceName=/dev/sda1,Ebs={DeleteOnTermination=True,VolumeType='gp2',VolumeSize='${AWS_VOLUME_SIZE}'}" \
--block-device-mappings "DeviceName=/dev/sda1,Ebs={DeleteOnTermination=True,VolumeType='gp3',VolumeSize='${AWS_VOLUME_SIZE}'}" \
--security-group-ids ${AWS_SECURITY_GROUP} > ${OUTPUT} 2> ${ERROUTPUT}
docker run --rm amazon/aws-cli:${AWS_CLI_DOCKER_TAG} ec2 wait instance-running --instance-ids $(cat ${OUTPUT} | jq --raw-output ' .Instances[] | .InstanceId')

View File

@ -11,7 +11,7 @@
#
# This file will be overridden when update OpenVidu Platform
#
# Openvidu Version: 2.30.0
# Openvidu Version: 2.32.1
#
# Installation Mode: On Premises
#
@ -22,7 +22,7 @@ version: '3.1'
services:
openvidu-server:
image: openvidu/openvidu-server-pro:2.30.0
image: openvidu/openvidu-server-pro:2.32.1
restart: on-failure
network_mode: host
entrypoint: ['/usr/local/bin/entrypoint.sh']
@ -60,7 +60,7 @@ services:
max-size: "${DOCKER_LOGS_MAX_SIZE:-100M}"
replication-manager:
image: openvidu/replication-manager:2.30.0
image: openvidu/replication-manager:2.32.1
restart: always
network_mode: host
volumes:
@ -89,7 +89,7 @@ services:
max-size: "${DOCKER_LOGS_MAX_SIZE:-100M}"
coturn:
image: openvidu/openvidu-coturn:2.30.0
image: openvidu/openvidu-coturn:2.32.1
restart: on-failure
network_mode: host
env_file:
@ -112,7 +112,7 @@ services:
max-size: "${DOCKER_LOGS_MAX_SIZE:-100M}"
metricbeat:
image: docker.elastic.co/beats/metricbeat-oss:7.8.0
image: docker.elastic.co/beats/metricbeat-oss:7.12.1
network_mode: host
restart: always
user: root
@ -152,7 +152,7 @@ services:
max-size: "${DOCKER_LOGS_MAX_SIZE:-100M}"
filebeat:
image: docker.elastic.co/beats/filebeat-oss:7.8.0
image: docker.elastic.co/beats/filebeat-oss:7.12.1
network_mode: host
restart: always
user: root

View File

@ -2,8 +2,8 @@
# Global variables
OPENVIDU_FOLDER=openvidu
OPENVIDU_VERSION=master
OPENVIDU_UPGRADABLE_VERSION="2.30"
OPENVIDU_VERSION=v2.32.1
OPENVIDU_UPGRADABLE_VERSION="2.32"
AWS_SCRIPTS_FOLDER=${OPENVIDU_FOLDER}/cluster/aws
ELASTICSEARCH_FOLDER=${OPENVIDU_FOLDER}/elasticsearch
BEATS_FOLDER=${OPENVIDU_FOLDER}/beats

View File

@ -150,7 +150,7 @@ Resources:
Handler: index.handler
Role: !Sub ${DescribeImagesRole.Arn}
Timeout: 60
Runtime: python3.11
Runtime: python3.13
Code:
ZipFile: |
import boto3
@ -160,7 +160,7 @@ Resources:
def handler(event, context):
try:
response = boto3.client('ec2').describe_images(Filters=[
response = boto3.client('ec2').describe_images(IncludeDeprecated=True, Filters=[
{'Name': 'name', 'Values': [event['ResourceProperties']['Name']]},
{'Name': 'owner-alias', 'Values': ['amazon']}
])
@ -174,7 +174,7 @@ Resources:
Type: Custom::FindAMI
Properties:
ServiceToken: !Sub ${GetLatestUbuntuAmi.Arn}
Name: "*ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*"
Name: "*ubuntu/images/hvm-ssd/ubuntu-noble-24.04-amd64-server-*"
TurnServerInstance:
Type: 'AWS::EC2::Instance'
@ -286,9 +286,10 @@ Resources:
set -eu -o pipefail
apt-get update && apt-get install -y \
python3-setuptools \
python3-pip \
ec2-instance-connect
pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz
pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz --break-system-packages
cfn-init --region ${AWS::Region} --stack ${AWS::StackId} --resource TurnServerInstance
@ -314,7 +315,7 @@ Resources:
BlockDeviceMappings:
- DeviceName: /dev/sda1
Ebs:
VolumeType: gp2
VolumeType: gp3
DeleteOnTermination: true
VolumeSize: 25

View File

@ -2,8 +2,8 @@
COTURN_FOLDER="coturn"
CERTBOT_WRAPPER="${COTURN_FOLDER}/certbot-wrapper"
COTURN_VERSION=master
DOWNLOAD_URL="https://raw.githubusercontent.com/OpenVidu/openvidu/master/openvidu-server/deployments/external-turn/${COTURN_VERSION}"
COTURN_VERSION=v2
DOWNLOAD_URL="https://raw.githubusercontent.com/OpenVidu/openvidu/v2/openvidu-server/deployments/external-turn/${COTURN_VERSION}"
#COTURN_VERSION=4.6.2
#DOWNLOAD_URL="https://s3.eu-west-1.amazonaws.com/aws.openvidu.io/external-turn/${COTURN_VERSION}"

View File

@ -569,7 +569,7 @@ Resources:
#!/bin/bash
while true; do
HTTP_STATUS=$(curl -Ik http://localhost:5443/ | head -n1 | awk '{print $2}')
if [ $HTTP_STATUS == 200 ]; then
if [ $HTTP_STATUS == 401 ]; then
break
fi
sleep 5
@ -768,7 +768,7 @@ Resources:
BlockDeviceMappings:
- DeviceName: /dev/sda1
Ebs:
VolumeType: gp2
VolumeType: gp3
DeleteOnTermination: true
VolumeSize: 200
@ -1028,7 +1028,7 @@ Resources:
def copy_ami_operation(source_image_id, source_region, new_ami_name, ec2_client):
own_ami_filter = [{ 'Name': 'name', 'Values': [new_ami_name] }]
amis_response = ec2_client.describe_images(Filters=own_ami_filter)
amis_response = ec2_client.describe_images(IncludeDeprecated=True, Filters=own_ami_filter)
if (len(amis_response['Images']) == 1):
# If AMI exists, don't copy
return amis_response['Images'][0]['ImageId']
@ -1059,9 +1059,9 @@ Resources:
public_ami_master_node_filter = [{ 'Name': 'image-id', 'Values': [ source_image_id_master_node ] }]
public_ami_media_node_filter = [{ 'Name': 'image-id', 'Values': [ source_image_id_media_node ] }]
response = ec2_client_ov.describe_images(Filters=public_ami_master_node_filter)
response = ec2_client_ov.describe_images(IncludeDeprecated=True, Filters=public_ami_master_node_filter)
new_ami_name_master_node = "[ OpenVidu PRO Master Node AMI Copy ] - " + response['Images'][0]['Name']
response = ec2_client_ov.describe_images(Filters=public_ami_media_node_filter)
response = ec2_client_ov.describe_images(IncludeDeprecated=True, Filters=public_ami_media_node_filter)
new_ami_name_media_node = "[ OpenVidu PRO/ENTERPRISE Media Node AMI Copy ] - " + response['Images'][0]['Name']
# Copy master node AMI and media node AMI
@ -1107,7 +1107,7 @@ Resources:
Handler: index.handler
Role:
!GetAtt CloudformationLambdaRole.Arn
Runtime: python3.11
Runtime: python3.13
Timeout: 900
CloudformationLambdaInvoke:

View File

@ -103,7 +103,7 @@ Resources:
for IMAGE in "${IMAGES[@]}"
do
# Replace the image tag in the YAML file
sed -i "s,$IMAGE:.*,${IMAGE}:master,g" docker-compose.yml
sed -i "s,$IMAGE:.*,${IMAGE}:master-v2,g" docker-compose.yml
done
# Docker pull of the images
@ -175,9 +175,9 @@ Resources:
BlockDeviceMappings:
- DeviceName: /dev/sda1
Ebs:
VolumeType: gp2
VolumeType: gp3
DeleteOnTermination: true
VolumeSize: 10
VolumeSize: 15
Tags:
- Key: Name
Value: !Ref AWS::StackName
@ -187,9 +187,10 @@ Resources:
#!/bin/bash -x
set -eu -o pipefail
apt-get update && apt-get install -y \
python3-setuptools \
python3-pip \
ec2-instance-connect
pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz
pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz --break-system-packages
cfn-init --region ${AWS::Region} --stack ${AWS::StackId} --resource KurentoMediaServer

View File

@ -90,14 +90,14 @@ Resources:
IMAGES=$(echo "$IMAGES" | grep -v openvidu/openvidu-elasticsearch)
for IMG in $IMAGES
do
sed -i "s|$IMG.*|$IMG:master|g" docker-compose.yml
sed -i "s|$IMG.*|$IMG:master-v2|g" docker-compose.yml
done
# docker-compose.override.yml replace with master version
IMAGES="$(cat docker-compose.override.yml | grep 'image: openvidu/' | cut -d':' -f2 | sed -e 's/^[[:space:]]*//')"
for IMG in $IMAGES
do
sed -i "s|$IMG.*|$IMG:master|g" docker-compose.override.yml
sed -i "s|$IMG.*|$IMG:master-v2|g" docker-compose.override.yml
done
popd
@ -137,18 +137,19 @@ Resources:
BlockDeviceMappings:
- DeviceName: /dev/sda1
Ebs:
VolumeType: gp2
VolumeType: gp3
DeleteOnTermination: true
VolumeSize: 10
VolumeSize: 15
UserData:
"Fn::Base64":
!Sub |
#!/bin/bash -x
set -eu -o pipefail
apt-get update && apt-get install -y \
python3-setuptools \
python3-pip \
ec2-instance-connect
pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz
pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz --break-system-packages
cfn-init --region ${AWS::Region} --stack ${AWS::StackId} --resource OpenviduServerPro

Some files were not shown because too many files have changed in this diff Show More