mirror of https://github.com/OpenVidu/openvidu.git
Compare commits
136 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
65f6725b6e | |
|
|
88bf128d5f | |
|
|
4efd901c2f | |
|
|
39e8c21b94 | |
|
|
9faad0720f | |
|
|
f123e3cbb2 | |
|
|
5921eef20a | |
|
|
da7f92d707 | |
|
|
4eef1cb18b | |
|
|
490cbc1c16 | |
|
|
d835f86577 | |
|
|
cf5d8a14a0 | |
|
|
f7ba36aebb | |
|
|
82cbd691c1 | |
|
|
360c437de7 | |
|
|
35bad7952d | |
|
|
f5397848c1 | |
|
|
97a3b200d8 | |
|
|
4ab9797c82 | |
|
|
10549ca631 | |
|
|
e22de69094 | |
|
|
79872ca288 | |
|
|
dc8626fbf4 | |
|
|
812677da8e | |
|
|
e3050f35ea | |
|
|
aa54c5e0e4 | |
|
|
b4b61f660a | |
|
|
b7e7a0dda3 | |
|
|
dbb0bf782b | |
|
|
51cf1bcbc6 | |
|
|
76ecaf44ff | |
|
|
316f938e4a | |
|
|
8bff08d39f | |
|
|
8cd7c6f06a | |
|
|
9f13d2b4f2 | |
|
|
f70a7dc48f | |
|
|
ab97b4b4ef | |
|
|
390fdc4870 | |
|
|
5cf0cf0e11 | |
|
|
a14cd70b09 | |
|
|
4a805bd197 | |
|
|
ec41f1748b | |
|
|
e89771cb0d | |
|
|
d55845ab91 | |
|
|
b1207a9f1a | |
|
|
c9703a49b0 | |
|
|
c06097d101 | |
|
|
9b575bf778 | |
|
|
9bbe7787c7 | |
|
|
a80a688f3c | |
|
|
216d0e399f | |
|
|
46050c40b4 | |
|
|
0d728f71d0 | |
|
|
98880f6405 | |
|
|
437c8446f1 | |
|
|
aeac86b3c0 | |
|
|
a8fe54fa6c | |
|
|
bf56fe02a7 | |
|
|
4c4bf277e2 | |
|
|
6d438fb61a | |
|
|
8772efaf46 | |
|
|
3353cd14e5 | |
|
|
3b35a8b264 | |
|
|
1aabf62f34 | |
|
|
03c8b6e57f | |
|
|
d320dd590d | |
|
|
7207a1591c | |
|
|
4776336629 | |
|
|
69b940bf0e | |
|
|
4f074f7633 | |
|
|
605cee8bae | |
|
|
71265ffec9 | |
|
|
36d1f3bd5b | |
|
|
6425eb8244 | |
|
|
94c362f96f | |
|
|
770ffaeed6 | |
|
|
7ad39d423d | |
|
|
c5ba1f770c | |
|
|
79e2385358 | |
|
|
afdbe9e236 | |
|
|
3671904a97 | |
|
|
ddd42414ea | |
|
|
c7892b3d70 | |
|
|
6315acafb3 | |
|
|
a9ad482c0b | |
|
|
f120e6a70c | |
|
|
20630c0553 | |
|
|
a002e766ca | |
|
|
ffd232b428 | |
|
|
a81d3f7c26 | |
|
|
146aa315fc | |
|
|
d330a8ef72 | |
|
|
f8032b7b10 | |
|
|
9a522af1bc | |
|
|
67b6aa7158 | |
|
|
2eda703c3a | |
|
|
564124fd93 | |
|
|
c249a63662 | |
|
|
9de6f3ddeb | |
|
|
a7036993ff | |
|
|
1b4e3f29d8 | |
|
|
0f22d6310d | |
|
|
49f808ee61 | |
|
|
ffe36855bb | |
|
|
e6407b40ec | |
|
|
d10dee49fa | |
|
|
96968ae54e | |
|
|
1411f7d064 | |
|
|
c05c1c599a | |
|
|
b6738f80d6 | |
|
|
0a883577f5 | |
|
|
8dcaedfc28 | |
|
|
a1c3652164 | |
|
|
b177891341 | |
|
|
22505d38c8 | |
|
|
0f6e96380b | |
|
|
7e8e031e8d | |
|
|
c9d9919684 | |
|
|
ace21eb8bb | |
|
|
8037253ee0 | |
|
|
9bafa811e7 | |
|
|
3b60045a17 | |
|
|
582a663ff0 | |
|
|
b6deca81e1 | |
|
|
40ed3b5dbe | |
|
|
a805b3d8b3 | |
|
|
f99cf2f834 | |
|
|
023c1c188f | |
|
|
7e45b027de | |
|
|
33bcd91ef5 | |
|
|
1faf9dbe8b | |
|
|
c1149079c8 | |
|
|
ef45123a74 | |
|
|
1515f60258 | |
|
|
7132277d47 | |
|
|
babe7be554 |
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
lib
|
||||
node_modules
|
||||
static
|
||||
ts4.4
|
||||
openvidu-browser-*.tgz
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"singleQuote": true,
|
||||
"printWidth": 120,
|
||||
"trailingComma": "es5"
|
||||
}
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
|
@ -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"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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,8 +470,7 @@ export class Publisher extends StreamManager {
|
|||
};
|
||||
|
||||
if (this.stream.isSendScreen()) {
|
||||
|
||||
if(this.stream.isSendAudio() && mediaStream.getAudioTracks().length === 0){
|
||||
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;
|
||||
this.stream.hasAudio = 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 = () => {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -993,7 +1005,7 @@ export class Session extends EventDispatcher {
|
|||
event.newValue = event.newValue === 'true';
|
||||
stream.videoActive = event.newValue;
|
||||
const videoTrack = stream?.getMediaStream()?.getVideoTracks()?.[0];
|
||||
if(videoTrack && !videoTrack.enabled && stream.videoActive){
|
||||
if (videoTrack && !videoTrack.enabled && stream.videoActive) {
|
||||
videoTrack.enabled = true;
|
||||
}
|
||||
break;
|
||||
|
|
@ -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]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
@ -56,6 +56,6 @@ export class ConnectionEvent extends Event {
|
|||
/**
|
||||
* @hidden
|
||||
*/
|
||||
// tslint:disable-next-line:no-empty
|
||||
callDefaultBehavior() { }
|
||||
|
||||
callDefaultBehavior() {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,6 @@ export class ConnectionPropertyChangedEvent extends Event {
|
|||
/**
|
||||
* @hidden
|
||||
*/
|
||||
// tslint:disable-next-line:no-empty
|
||||
|
||||
callDefaultBehavior() {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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() { }
|
||||
|
||||
callDefaultBehavior() {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,6 @@ export class FilterEvent extends Event {
|
|||
/**
|
||||
* @hidden
|
||||
*/
|
||||
// tslint:disable-next-line:no-empty
|
||||
|
||||
callDefaultBehavior() {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,6 +51,6 @@ export class NetworkQualityLevelChangedEvent extends Event {
|
|||
/**
|
||||
* @hidden
|
||||
*/
|
||||
// tslint:disable-next-line:no-empty
|
||||
|
||||
callDefaultBehavior() {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,6 +49,6 @@ export class PublisherSpeakingEvent extends Event {
|
|||
/**
|
||||
* @hidden
|
||||
*/
|
||||
// tslint:disable-next-line:no-empty
|
||||
|
||||
callDefaultBehavior() {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,6 +66,6 @@ export class RecordingEvent extends Event {
|
|||
/**
|
||||
* @hidden
|
||||
*/
|
||||
// tslint:disable-next-line:no-empty
|
||||
callDefaultBehavior() { }
|
||||
|
||||
callDefaultBehavior() {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,6 +59,6 @@ export class SignalEvent extends Event {
|
|||
/**
|
||||
* @hidden
|
||||
*/
|
||||
// tslint:disable-next-line:no-empty
|
||||
|
||||
callDefaultBehavior() {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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() { }
|
||||
|
||||
callDefaultBehavior() {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,6 @@ export class StreamManagerEvent extends Event {
|
|||
/**
|
||||
* @hidden
|
||||
*/
|
||||
// tslint:disable-next-line:no-empty
|
||||
|
||||
callDefaultBehavior() {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,6 +78,6 @@ export class StreamPropertyChangedEvent extends Event {
|
|||
/**
|
||||
* @hidden
|
||||
*/
|
||||
// tslint:disable-next-line:no-empty
|
||||
callDefaultBehavior() { }
|
||||
|
||||
callDefaultBehavior() {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -40,6 +40,6 @@ export class VideoElementEvent extends Event {
|
|||
/**
|
||||
* @hidden
|
||||
*/
|
||||
// tslint:disable-next-line:no-empty
|
||||
|
||||
callDefaultBehavior() {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -182,8 +182,6 @@ export class PlatformUtils {
|
|||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
|
|
@ -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"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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")) {
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
node_modules
|
||||
lib
|
||||
coverage
|
||||
dist
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"printWidth": 120,
|
||||
"tabWidth": 4,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "none",
|
||||
"semi": true,
|
||||
"arrowParens": "avoid"
|
||||
}
|
||||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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
|
|
@ -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"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
# -------------------------------
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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=(
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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}"
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
Loading…
Reference in New Issue