diff --git a/openvidu-angular/src/environments/environment.prod.ts b/openvidu-angular/src/environments/environment.prod.ts index 43a8889c..9a519d17 100644 --- a/openvidu-angular/src/environments/environment.prod.ts +++ b/openvidu-angular/src/environments/environment.prod.ts @@ -1,5 +1,4 @@ export const environment = { production: true, applicationServerUrl: '', - }; diff --git a/openvidu-components/.dockerignore b/openvidu-components/.dockerignore new file mode 100644 index 00000000..9b9606e4 --- /dev/null +++ b/openvidu-components/.dockerignore @@ -0,0 +1,2 @@ +**/node_modules +**/.angular \ No newline at end of file diff --git a/openvidu-components/docker/Dockerfile b/openvidu-components/docker/Dockerfile new file mode 100644 index 00000000..71ca0274 --- /dev/null +++ b/openvidu-components/docker/Dockerfile @@ -0,0 +1,25 @@ +FROM node:18.13.0-alpine3.17 + +ARG tutorial_name + +COPY ./$tutorial_name ./$tutorial_name + +WORKDIR /$tutorial_name + +# Install openvidu-angular dependencies and build it for production +RUN npm install -g npm && \ + npm install && \ + npm run build:prod + +# Copy openvidu-basic-node +RUN cp -r ./openvidu-basic-node /opt/ && \ + rm -rf ../$tutorial_name + +# Install openvidu-basic-node dependencies +RUN npm --prefix /opt/openvidu-basic-node install + +WORKDIR /opt/openvidu-basic-node + +COPY docker/entrypoint.sh . + +ENTRYPOINT [ "./entrypoint.sh" ] \ No newline at end of file diff --git a/openvidu-components/docker/create_image.sh b/openvidu-components/docker/create_image.sh new file mode 100755 index 00000000..c300edbe --- /dev/null +++ b/openvidu-components/docker/create_image.sh @@ -0,0 +1,28 @@ +#!/bin/bash +if [ $# -eq 0 ]; then + echo "No version argument provided. Usage: \"./create_image.sh \"" + exit 1 +fi + +if [ $# -eq 1 ]; then + echo "No tutorial argument provided. Usage: \"./create_image.sh \"" + exit 1 +fi + +DIR="../"$2"" +if [ -d "$DIR" ]; then + + pushd ../ + + cp -r ../openvidu-basic-node ./"$2" + + trap 'rm -rf ./openvidu-basic-node' ERR + + docker build --pull --no-cache --rm=true --build-arg tutorial_name=$2 -f docker/Dockerfile -t "$1" . + + rm -rf ./"$2"/openvidu-basic-node +else + echo "Error: ${DIR} not found. Can not continue." + exit 1 +fi + diff --git a/openvidu-components/docker/entrypoint.sh b/openvidu-components/docker/entrypoint.sh new file mode 100755 index 00000000..11fecf6a --- /dev/null +++ b/openvidu-components/docker/entrypoint.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +exec node index.js "$*" \ No newline at end of file diff --git a/openvidu-components/install.sh b/openvidu-components/install.sh index 67ac0fa2..10ab6801 100755 --- a/openvidu-components/install.sh +++ b/openvidu-components/install.sh @@ -10,7 +10,6 @@ TUTORIALS=( 'openvidu-custom-participants-panel' 'openvidu-custom-stream' 'openvidu-custom-toolbar' - 'openvidu-custom-toolbar' 'openvidu-custom-ui' 'openvidu-toggle-hand' 'openvidu-toolbar-buttons' diff --git a/openvidu-components/openvidu-additional-panels/angular.json b/openvidu-components/openvidu-additional-panels/angular.json index 925927da..ad1aaade 100644 --- a/openvidu-components/openvidu-additional-panels/angular.json +++ b/openvidu-components/openvidu-additional-panels/angular.json @@ -66,7 +66,7 @@ { "type": "initial", "maximumWarning": "500kb", - "maximumError": "1mb" + "maximumError": "5mb" }, { "type": "anyComponentStyle", diff --git a/openvidu-components/openvidu-additional-panels/package.json b/openvidu-components/openvidu-additional-panels/package.json index f335c5eb..e828d607 100644 --- a/openvidu-components/openvidu-additional-panels/package.json +++ b/openvidu-components/openvidu-additional-panels/package.json @@ -5,7 +5,9 @@ "ng": "ng", "start": "ng serve", "build": "ng build", - "watch": "ng build --watch --configuration development" + "watch": "ng build --watch --configuration development", + "build:prod": "./node_modules/@angular/cli/bin/ng.js build --output-path ./openvidu-basic-node/public/ --configuration production" + }, "private": true, "dependencies": { diff --git a/openvidu-components/openvidu-additional-panels/src/app/app.component.ts b/openvidu-components/openvidu-additional-panels/src/app/app.component.ts index dae8a3dc..bec47093 100644 --- a/openvidu-components/openvidu-additional-panels/src/app/app.component.ts +++ b/openvidu-components/openvidu-additional-panels/src/app/app.component.ts @@ -1,8 +1,9 @@ -import { Component } from "@angular/core"; import { HttpClient } from "@angular/common/http"; +import { Component } from "@angular/core"; import { lastValueFrom } from "rxjs"; -import { TokenModel, PanelService, PanelType } from "openvidu-angular"; +import { PanelService, PanelType, TokenModel } from "openvidu-angular"; +import { environment } from 'src/environments/environment'; @Component({ selector: "app-root", @@ -49,7 +50,7 @@ import { TokenModel, PanelService, PanelType } from "openvidu-angular"; }) export class AppComponent { - APPLICATION_SERVER_URL = 'http://localhost:5000/'; + APPLICATION_SERVER_URL = environment.applicationServerUrl; sessionId = "toolbar-additionalbtn-directive-example"; tokens!: TokenModel; @@ -89,12 +90,12 @@ export class AppComponent { * -------------------------------------------- * The methods below request the creation of a Session and a Token to * your application server. This keeps your OpenVidu deployment secure. - * + * * In this sample code, there is no user control at all. Anybody could * access your application server endpoints! In a real production * environment, your application server must identify the user to allow * access to the endpoints. - * + * * Visit https://docs.openvidu.io/en/stable/application-server to learn * more about the integration of OpenVidu in your application server. */ diff --git a/openvidu-components/openvidu-additional-panels/src/environments/environment.prod.ts b/openvidu-components/openvidu-additional-panels/src/environments/environment.prod.ts index 3612073b..9a519d17 100644 --- a/openvidu-components/openvidu-additional-panels/src/environments/environment.prod.ts +++ b/openvidu-components/openvidu-additional-panels/src/environments/environment.prod.ts @@ -1,3 +1,4 @@ export const environment = { - production: true + production: true, + applicationServerUrl: '', }; diff --git a/openvidu-components/openvidu-additional-panels/src/environments/environment.ts b/openvidu-components/openvidu-additional-panels/src/environments/environment.ts index f56ff470..26d22290 100644 --- a/openvidu-components/openvidu-additional-panels/src/environments/environment.ts +++ b/openvidu-components/openvidu-additional-panels/src/environments/environment.ts @@ -3,7 +3,8 @@ // The list of file replacements can be found in `angular.json`. export const environment = { - production: false + production: false, + applicationServerUrl: 'http://localhost:5000/', }; /* diff --git a/openvidu-components/openvidu-admin-dashboard/angular.json b/openvidu-components/openvidu-admin-dashboard/angular.json index 32a37581..677d7cfb 100644 --- a/openvidu-components/openvidu-admin-dashboard/angular.json +++ b/openvidu-components/openvidu-admin-dashboard/angular.json @@ -39,7 +39,7 @@ { "type": "initial", "maximumWarning": "500kb", - "maximumError": "1mb" + "maximumError": "5mb" }, { "type": "anyComponentStyle", diff --git a/openvidu-components/openvidu-admin-dashboard/package.json b/openvidu-components/openvidu-admin-dashboard/package.json index 569ee7c5..03aa4778 100644 --- a/openvidu-components/openvidu-admin-dashboard/package.json +++ b/openvidu-components/openvidu-admin-dashboard/package.json @@ -5,7 +5,8 @@ "ng": "ng", "start": "ng serve", "build": "ng build", - "watch": "ng build --watch --configuration development" + "watch": "ng build --watch --configuration development", + "build:prod": "./node_modules/@angular/cli/bin/ng.js build --output-path ./openvidu-basic-node/public/ --configuration production" }, "private": true, "dependencies": { diff --git a/openvidu-components/openvidu-custom-activities-panel/angular.json b/openvidu-components/openvidu-custom-activities-panel/angular.json index 193c7274..d72c51ba 100644 --- a/openvidu-components/openvidu-custom-activities-panel/angular.json +++ b/openvidu-components/openvidu-custom-activities-panel/angular.json @@ -66,7 +66,7 @@ { "type": "initial", "maximumWarning": "500kb", - "maximumError": "1mb" + "maximumError": "5mb" }, { "type": "anyComponentStyle", diff --git a/openvidu-components/openvidu-custom-activities-panel/package.json b/openvidu-components/openvidu-custom-activities-panel/package.json index 6221363b..6ec4d695 100644 --- a/openvidu-components/openvidu-custom-activities-panel/package.json +++ b/openvidu-components/openvidu-custom-activities-panel/package.json @@ -5,7 +5,8 @@ "ng": "ng", "start": "ng serve", "build": "ng build", - "watch": "ng build --watch --configuration development" + "watch": "ng build --watch --configuration development", + "build:prod": "./node_modules/@angular/cli/bin/ng.js build --output-path ./openvidu-basic-node/public/ --configuration production" }, "private": true, "dependencies": { diff --git a/openvidu-components/openvidu-custom-activities-panel/src/app/app.component.ts b/openvidu-components/openvidu-custom-activities-panel/src/app/app.component.ts index d084114f..510a6262 100644 --- a/openvidu-components/openvidu-custom-activities-panel/src/app/app.component.ts +++ b/openvidu-components/openvidu-custom-activities-panel/src/app/app.component.ts @@ -1,8 +1,9 @@ -import { Component, OnInit } from "@angular/core"; import { HttpClient } from "@angular/common/http"; +import { Component, OnInit } from "@angular/core"; import { lastValueFrom } from "rxjs"; import { TokenModel } from "openvidu-angular"; +import { environment } from 'src/environments/environment'; @Component({ selector: "app-root", @@ -30,7 +31,7 @@ import { TokenModel } from "openvidu-angular"; }) export class AppComponent implements OnInit { - APPLICATION_SERVER_URL = 'http://localhost:5000/'; + APPLICATION_SERVER_URL = environment.applicationServerUrl; sessionId = "activities-panel-directive-example"; tokens!: TokenModel; @@ -50,12 +51,12 @@ export class AppComponent implements OnInit { * -------------------------------------------- * The methods below request the creation of a Session and a Token to * your application server. This keeps your OpenVidu deployment secure. - * + * * In this sample code, there is no user control at all. Anybody could * access your application server endpoints! In a real production * environment, your application server must identify the user to allow * access to the endpoints. - * + * * Visit https://docs.openvidu.io/en/stable/application-server to learn * more about the integration of OpenVidu in your application server. */ diff --git a/openvidu-components/openvidu-custom-activities-panel/src/environments/environment.prod.ts b/openvidu-components/openvidu-custom-activities-panel/src/environments/environment.prod.ts index 3612073b..9a519d17 100644 --- a/openvidu-components/openvidu-custom-activities-panel/src/environments/environment.prod.ts +++ b/openvidu-components/openvidu-custom-activities-panel/src/environments/environment.prod.ts @@ -1,3 +1,4 @@ export const environment = { - production: true + production: true, + applicationServerUrl: '', }; diff --git a/openvidu-components/openvidu-custom-activities-panel/src/environments/environment.ts b/openvidu-components/openvidu-custom-activities-panel/src/environments/environment.ts index f56ff470..26d22290 100644 --- a/openvidu-components/openvidu-custom-activities-panel/src/environments/environment.ts +++ b/openvidu-components/openvidu-custom-activities-panel/src/environments/environment.ts @@ -3,7 +3,8 @@ // The list of file replacements can be found in `angular.json`. export const environment = { - production: false + production: false, + applicationServerUrl: 'http://localhost:5000/', }; /* diff --git a/openvidu-components/openvidu-custom-chat-panel/angular.json b/openvidu-components/openvidu-custom-chat-panel/angular.json index e5ffd067..ba36a4fd 100644 --- a/openvidu-components/openvidu-custom-chat-panel/angular.json +++ b/openvidu-components/openvidu-custom-chat-panel/angular.json @@ -66,7 +66,7 @@ { "type": "initial", "maximumWarning": "500kb", - "maximumError": "1mb" + "maximumError": "5mb" }, { "type": "anyComponentStyle", diff --git a/openvidu-components/openvidu-custom-chat-panel/package.json b/openvidu-components/openvidu-custom-chat-panel/package.json index 69c32e40..dfb92af7 100644 --- a/openvidu-components/openvidu-custom-chat-panel/package.json +++ b/openvidu-components/openvidu-custom-chat-panel/package.json @@ -5,7 +5,8 @@ "ng": "ng", "start": "ng serve", "build": "ng build", - "watch": "ng build --watch --configuration development" + "watch": "ng build --watch --configuration development", + "build:prod": "./node_modules/@angular/cli/bin/ng.js build --output-path ./openvidu-basic-node/public/ --configuration production" }, "private": true, "dependencies": { diff --git a/openvidu-components/openvidu-custom-chat-panel/src/app/app.component.ts b/openvidu-components/openvidu-custom-chat-panel/src/app/app.component.ts index 007088fe..c45b2ca6 100644 --- a/openvidu-components/openvidu-custom-chat-panel/src/app/app.component.ts +++ b/openvidu-components/openvidu-custom-chat-panel/src/app/app.component.ts @@ -1,9 +1,10 @@ -import { Component, OnInit } from "@angular/core"; import { HttpClient } from "@angular/common/http"; +import { Component, OnInit } from "@angular/core"; import { lastValueFrom } from "rxjs"; -import { TokenModel, Signal } from "openvidu-angular"; +import { Signal, TokenModel } from "openvidu-angular"; import { Session, SignalOptions } from "openvidu-browser"; +import { environment } from 'src/environments/environment'; @Component({ selector: "app-root", @@ -35,7 +36,7 @@ import { Session, SignalOptions } from "openvidu-browser"; }) export class AppComponent implements OnInit { - APPLICATION_SERVER_URL = 'http://localhost:5000/'; + APPLICATION_SERVER_URL = environment.applicationServerUrl; sessionId = "chat-panel-directive-example"; tokens!: TokenModel; @@ -75,12 +76,12 @@ export class AppComponent implements OnInit { * -------------------------------------------- * The methods below request the creation of a Session and a Token to * your application server. This keeps your OpenVidu deployment secure. - * + * * In this sample code, there is no user control at all. Anybody could * access your application server endpoints! In a real production * environment, your application server must identify the user to allow * access to the endpoints. - * + * * Visit https://docs.openvidu.io/en/stable/application-server to learn * more about the integration of OpenVidu in your application server. */ diff --git a/openvidu-components/openvidu-custom-chat-panel/src/environments/environment.prod.ts b/openvidu-components/openvidu-custom-chat-panel/src/environments/environment.prod.ts index 3612073b..9a519d17 100644 --- a/openvidu-components/openvidu-custom-chat-panel/src/environments/environment.prod.ts +++ b/openvidu-components/openvidu-custom-chat-panel/src/environments/environment.prod.ts @@ -1,3 +1,4 @@ export const environment = { - production: true + production: true, + applicationServerUrl: '', }; diff --git a/openvidu-components/openvidu-custom-chat-panel/src/environments/environment.ts b/openvidu-components/openvidu-custom-chat-panel/src/environments/environment.ts index f56ff470..26d22290 100644 --- a/openvidu-components/openvidu-custom-chat-panel/src/environments/environment.ts +++ b/openvidu-components/openvidu-custom-chat-panel/src/environments/environment.ts @@ -3,7 +3,8 @@ // The list of file replacements can be found in `angular.json`. export const environment = { - production: false + production: false, + applicationServerUrl: 'http://localhost:5000/', }; /* diff --git a/openvidu-components/openvidu-custom-layout/angular.json b/openvidu-components/openvidu-custom-layout/angular.json index a70afe8b..7293549e 100644 --- a/openvidu-components/openvidu-custom-layout/angular.json +++ b/openvidu-components/openvidu-custom-layout/angular.json @@ -66,7 +66,7 @@ { "type": "initial", "maximumWarning": "500kb", - "maximumError": "1mb" + "maximumError": "5mb" }, { "type": "anyComponentStyle", diff --git a/openvidu-components/openvidu-custom-layout/package.json b/openvidu-components/openvidu-custom-layout/package.json index 9216e235..68329cac 100644 --- a/openvidu-components/openvidu-custom-layout/package.json +++ b/openvidu-components/openvidu-custom-layout/package.json @@ -5,7 +5,8 @@ "ng": "ng", "start": "ng serve", "build": "ng build", - "watch": "ng build --watch --configuration development" + "watch": "ng build --watch --configuration development", + "build:prod": "./node_modules/@angular/cli/bin/ng.js build --output-path ./openvidu-basic-node/public/ --configuration production" }, "private": true, "dependencies": { diff --git a/openvidu-components/openvidu-custom-layout/src/app/app.component.ts b/openvidu-components/openvidu-custom-layout/src/app/app.component.ts index 7e13799c..ec2714b7 100644 --- a/openvidu-components/openvidu-custom-layout/src/app/app.component.ts +++ b/openvidu-components/openvidu-custom-layout/src/app/app.component.ts @@ -1,8 +1,9 @@ -import { Component, OnInit } from "@angular/core"; import { HttpClient } from "@angular/common/http"; -import { Subscription, lastValueFrom } from "rxjs"; +import { Component, OnInit } from "@angular/core"; +import { lastValueFrom, Subscription } from "rxjs"; -import { TokenModel, ParticipantService, ParticipantAbstractModel } from "openvidu-angular"; +import { ParticipantAbstractModel, ParticipantService, TokenModel } from "openvidu-angular"; +import { environment } from 'src/environments/environment'; @Component({ selector: "app-root", @@ -35,7 +36,7 @@ import { TokenModel, ParticipantService, ParticipantAbstractModel } from "openvi }) export class AppComponent implements OnInit { - APPLICATION_SERVER_URL = 'http://localhost:5000/'; + APPLICATION_SERVER_URL = environment.applicationServerUrl; sessionId = 'layout-directive-example'; tokens!: TokenModel; diff --git a/openvidu-components/openvidu-custom-layout/src/environments/environment.prod.ts b/openvidu-components/openvidu-custom-layout/src/environments/environment.prod.ts index 3612073b..9a519d17 100644 --- a/openvidu-components/openvidu-custom-layout/src/environments/environment.prod.ts +++ b/openvidu-components/openvidu-custom-layout/src/environments/environment.prod.ts @@ -1,3 +1,4 @@ export const environment = { - production: true + production: true, + applicationServerUrl: '', }; diff --git a/openvidu-components/openvidu-custom-layout/src/environments/environment.ts b/openvidu-components/openvidu-custom-layout/src/environments/environment.ts index f56ff470..26d22290 100644 --- a/openvidu-components/openvidu-custom-layout/src/environments/environment.ts +++ b/openvidu-components/openvidu-custom-layout/src/environments/environment.ts @@ -3,7 +3,8 @@ // The list of file replacements can be found in `angular.json`. export const environment = { - production: false + production: false, + applicationServerUrl: 'http://localhost:5000/', }; /* diff --git a/openvidu-components/openvidu-custom-panels/angular.json b/openvidu-components/openvidu-custom-panels/angular.json index e302456c..f554f7d7 100644 --- a/openvidu-components/openvidu-custom-panels/angular.json +++ b/openvidu-components/openvidu-custom-panels/angular.json @@ -66,7 +66,7 @@ { "type": "initial", "maximumWarning": "500kb", - "maximumError": "1mb" + "maximumError": "5mb" }, { "type": "anyComponentStyle", diff --git a/openvidu-components/openvidu-custom-panels/package.json b/openvidu-components/openvidu-custom-panels/package.json index 3fdbcc80..e226939b 100644 --- a/openvidu-components/openvidu-custom-panels/package.json +++ b/openvidu-components/openvidu-custom-panels/package.json @@ -5,7 +5,8 @@ "ng": "ng", "start": "ng serve", "build": "ng build", - "watch": "ng build --watch --configuration development" + "watch": "ng build --watch --configuration development", + "build:prod": "./node_modules/@angular/cli/bin/ng.js build --output-path ./openvidu-basic-node/public/ --configuration production" }, "private": true, "dependencies": { diff --git a/openvidu-components/openvidu-custom-panels/src/app/app.component.ts b/openvidu-components/openvidu-custom-panels/src/app/app.component.ts index 3e43a50c..2569a088 100644 --- a/openvidu-components/openvidu-custom-panels/src/app/app.component.ts +++ b/openvidu-components/openvidu-custom-panels/src/app/app.component.ts @@ -1,8 +1,9 @@ -import { Component, OnInit } from "@angular/core"; import { HttpClient } from "@angular/common/http"; +import { Component, OnInit } from "@angular/core"; import { lastValueFrom } from "rxjs"; import { TokenModel } from "openvidu-angular"; +import { environment } from 'src/environments/environment'; @Component({ selector: "app-root", @@ -33,7 +34,7 @@ import { TokenModel } from "openvidu-angular"; }) export class AppComponent implements OnInit { - APPLICATION_SERVER_URL = 'http://localhost:5000/'; + APPLICATION_SERVER_URL = environment.applicationServerUrl; sessionId = "panel-directive-example"; tokens!: TokenModel; @@ -53,12 +54,12 @@ export class AppComponent implements OnInit { * -------------------------------------------- * The methods below request the creation of a Session and a Token to * your application server. This keeps your OpenVidu deployment secure. - * + * * In this sample code, there is no user control at all. Anybody could * access your application server endpoints! In a real production * environment, your application server must identify the user to allow * access to the endpoints. - * + * * Visit https://docs.openvidu.io/en/stable/application-server to learn * more about the integration of OpenVidu in your application server. */ diff --git a/openvidu-components/openvidu-custom-panels/src/environments/environment.prod.ts b/openvidu-components/openvidu-custom-panels/src/environments/environment.prod.ts index 3612073b..9a519d17 100644 --- a/openvidu-components/openvidu-custom-panels/src/environments/environment.prod.ts +++ b/openvidu-components/openvidu-custom-panels/src/environments/environment.prod.ts @@ -1,3 +1,4 @@ export const environment = { - production: true + production: true, + applicationServerUrl: '', }; diff --git a/openvidu-components/openvidu-custom-panels/src/environments/environment.ts b/openvidu-components/openvidu-custom-panels/src/environments/environment.ts index f56ff470..26d22290 100644 --- a/openvidu-components/openvidu-custom-panels/src/environments/environment.ts +++ b/openvidu-components/openvidu-custom-panels/src/environments/environment.ts @@ -3,7 +3,8 @@ // The list of file replacements can be found in `angular.json`. export const environment = { - production: false + production: false, + applicationServerUrl: 'http://localhost:5000/', }; /* diff --git a/openvidu-components/openvidu-custom-participant-panel-item-elements/angular.json b/openvidu-components/openvidu-custom-participant-panel-item-elements/angular.json index 50a16f34..e128aaaf 100644 --- a/openvidu-components/openvidu-custom-participant-panel-item-elements/angular.json +++ b/openvidu-components/openvidu-custom-participant-panel-item-elements/angular.json @@ -66,7 +66,7 @@ { "type": "initial", "maximumWarning": "500kb", - "maximumError": "1mb" + "maximumError": "5mb" }, { "type": "anyComponentStyle", diff --git a/openvidu-components/openvidu-custom-participant-panel-item-elements/package.json b/openvidu-components/openvidu-custom-participant-panel-item-elements/package.json index 0b96e036..9dc83d03 100644 --- a/openvidu-components/openvidu-custom-participant-panel-item-elements/package.json +++ b/openvidu-components/openvidu-custom-participant-panel-item-elements/package.json @@ -5,7 +5,8 @@ "ng": "ng", "start": "ng serve", "build": "ng build", - "watch": "ng build --watch --configuration development" + "watch": "ng build --watch --configuration development", + "build:prod": "./node_modules/@angular/cli/bin/ng.js build --output-path ./openvidu-basic-node/public/ --configuration production" }, "private": true, "dependencies": { diff --git a/openvidu-components/openvidu-custom-participant-panel-item-elements/src/app/app.component.ts b/openvidu-components/openvidu-custom-participant-panel-item-elements/src/app/app.component.ts index bf5aad56..9ee99f48 100644 --- a/openvidu-components/openvidu-custom-participant-panel-item-elements/src/app/app.component.ts +++ b/openvidu-components/openvidu-custom-participant-panel-item-elements/src/app/app.component.ts @@ -1,8 +1,9 @@ -import { Component, OnInit } from "@angular/core"; import { HttpClient } from "@angular/common/http"; +import { Component, OnInit } from "@angular/core"; import { lastValueFrom } from "rxjs"; -import { TokenModel, OpenViduService } from "openvidu-angular"; +import { OpenViduService, TokenModel } from "openvidu-angular"; +import { environment } from 'src/environments/environment'; @Component({ selector: "app-root", @@ -23,7 +24,7 @@ import { TokenModel, OpenViduService } from "openvidu-angular"; }) export class AppComponent implements OnInit { - APPLICATION_SERVER_URL = 'http://localhost:5000/'; + APPLICATION_SERVER_URL = environment.applicationServerUrl; sessionId = "participants-panel-directive-example"; tokens!: TokenModel; @@ -50,12 +51,12 @@ export class AppComponent implements OnInit { * -------------------------------------------- * The methods below request the creation of a Session and a Token to * your application server. This keeps your OpenVidu deployment secure. - * + * * In this sample code, there is no user control at all. Anybody could * access your application server endpoints! In a real production * environment, your application server must identify the user to allow * access to the endpoints. - * + * * Visit https://docs.openvidu.io/en/stable/application-server to learn * more about the integration of OpenVidu in your application server. */ diff --git a/openvidu-components/openvidu-custom-participant-panel-item-elements/src/environments/environment.prod.ts b/openvidu-components/openvidu-custom-participant-panel-item-elements/src/environments/environment.prod.ts index 3612073b..9a519d17 100644 --- a/openvidu-components/openvidu-custom-participant-panel-item-elements/src/environments/environment.prod.ts +++ b/openvidu-components/openvidu-custom-participant-panel-item-elements/src/environments/environment.prod.ts @@ -1,3 +1,4 @@ export const environment = { - production: true + production: true, + applicationServerUrl: '', }; diff --git a/openvidu-components/openvidu-custom-participant-panel-item-elements/src/environments/environment.ts b/openvidu-components/openvidu-custom-participant-panel-item-elements/src/environments/environment.ts index f56ff470..26d22290 100644 --- a/openvidu-components/openvidu-custom-participant-panel-item-elements/src/environments/environment.ts +++ b/openvidu-components/openvidu-custom-participant-panel-item-elements/src/environments/environment.ts @@ -3,7 +3,8 @@ // The list of file replacements can be found in `angular.json`. export const environment = { - production: false + production: false, + applicationServerUrl: 'http://localhost:5000/', }; /* diff --git a/openvidu-components/openvidu-custom-participant-panel-item/angular.json b/openvidu-components/openvidu-custom-participant-panel-item/angular.json index 5a082b4d..28dd9142 100644 --- a/openvidu-components/openvidu-custom-participant-panel-item/angular.json +++ b/openvidu-components/openvidu-custom-participant-panel-item/angular.json @@ -66,7 +66,7 @@ { "type": "initial", "maximumWarning": "500kb", - "maximumError": "1mb" + "maximumError": "5mb" }, { "type": "anyComponentStyle", diff --git a/openvidu-components/openvidu-custom-participant-panel-item/package.json b/openvidu-components/openvidu-custom-participant-panel-item/package.json index de3ca31c..ce88d39c 100644 --- a/openvidu-components/openvidu-custom-participant-panel-item/package.json +++ b/openvidu-components/openvidu-custom-participant-panel-item/package.json @@ -5,7 +5,8 @@ "ng": "ng", "start": "ng serve", "build": "ng build", - "watch": "ng build --watch --configuration development" + "watch": "ng build --watch --configuration development", + "build:prod": "./node_modules/@angular/cli/bin/ng.js build --output-path ./openvidu-basic-node/public/ --configuration production" }, "private": true, "dependencies": { diff --git a/openvidu-components/openvidu-custom-participant-panel-item/src/app/app.component.ts b/openvidu-components/openvidu-custom-participant-panel-item/src/app/app.component.ts index 52941767..3d6fefd5 100644 --- a/openvidu-components/openvidu-custom-participant-panel-item/src/app/app.component.ts +++ b/openvidu-components/openvidu-custom-participant-panel-item/src/app/app.component.ts @@ -1,8 +1,9 @@ -import { Component, OnInit } from "@angular/core"; import { HttpClient } from "@angular/common/http"; +import { Component, OnInit } from "@angular/core"; import { lastValueFrom } from "rxjs"; import { TokenModel } from "openvidu-angular"; +import { environment } from 'src/environments/environment'; @Component({ selector: 'app-root', @@ -22,7 +23,7 @@ import { TokenModel } from "openvidu-angular"; }) export class AppComponent implements OnInit { - APPLICATION_SERVER_URL = 'http://localhost:5000/'; + APPLICATION_SERVER_URL = environment.applicationServerUrl; sessionId = 'participants-panel-directive-example'; tokens!: TokenModel; @@ -42,12 +43,12 @@ export class AppComponent implements OnInit { * -------------------------------------------- * The methods below request the creation of a Session and a Token to * your application server. This keeps your OpenVidu deployment secure. - * + * * In this sample code, there is no user control at all. Anybody could * access your application server endpoints! In a real production * environment, your application server must identify the user to allow * access to the endpoints. - * + * * Visit https://docs.openvidu.io/en/stable/application-server to learn * more about the integration of OpenVidu in your application server. */ diff --git a/openvidu-components/openvidu-custom-participant-panel-item/src/environments/environment.prod.ts b/openvidu-components/openvidu-custom-participant-panel-item/src/environments/environment.prod.ts index 3612073b..9a519d17 100644 --- a/openvidu-components/openvidu-custom-participant-panel-item/src/environments/environment.prod.ts +++ b/openvidu-components/openvidu-custom-participant-panel-item/src/environments/environment.prod.ts @@ -1,3 +1,4 @@ export const environment = { - production: true + production: true, + applicationServerUrl: '', }; diff --git a/openvidu-components/openvidu-custom-participant-panel-item/src/environments/environment.ts b/openvidu-components/openvidu-custom-participant-panel-item/src/environments/environment.ts index f56ff470..26d22290 100644 --- a/openvidu-components/openvidu-custom-participant-panel-item/src/environments/environment.ts +++ b/openvidu-components/openvidu-custom-participant-panel-item/src/environments/environment.ts @@ -3,7 +3,8 @@ // The list of file replacements can be found in `angular.json`. export const environment = { - production: false + production: false, + applicationServerUrl: 'http://localhost:5000/', }; /* diff --git a/openvidu-components/openvidu-custom-participants-panel/angular.json b/openvidu-components/openvidu-custom-participants-panel/angular.json index 64fa54cc..fb5b7fe0 100644 --- a/openvidu-components/openvidu-custom-participants-panel/angular.json +++ b/openvidu-components/openvidu-custom-participants-panel/angular.json @@ -66,7 +66,7 @@ { "type": "initial", "maximumWarning": "500kb", - "maximumError": "1mb" + "maximumError": "5mb" }, { "type": "anyComponentStyle", diff --git a/openvidu-components/openvidu-custom-participants-panel/package.json b/openvidu-components/openvidu-custom-participants-panel/package.json index c902c2c9..cd2a3a45 100644 --- a/openvidu-components/openvidu-custom-participants-panel/package.json +++ b/openvidu-components/openvidu-custom-participants-panel/package.json @@ -5,7 +5,8 @@ "ng": "ng", "start": "ng serve", "build": "ng build", - "watch": "ng build --watch --configuration development" + "watch": "ng build --watch --configuration development", + "build:prod": "./node_modules/@angular/cli/bin/ng.js build --output-path ./openvidu-basic-node/public/ --configuration production" }, "private": true, "dependencies": { diff --git a/openvidu-components/openvidu-custom-participants-panel/src/app/app.component.ts b/openvidu-components/openvidu-custom-participants-panel/src/app/app.component.ts index 79d6a5f7..fe304fb0 100644 --- a/openvidu-components/openvidu-custom-participants-panel/src/app/app.component.ts +++ b/openvidu-components/openvidu-custom-participants-panel/src/app/app.component.ts @@ -1,6 +1,6 @@ -import { Component, OnInit } from "@angular/core"; import { HttpClient } from "@angular/common/http"; -import { Subscription, lastValueFrom } from "rxjs"; +import { Component, OnInit } from "@angular/core"; +import { lastValueFrom, Subscription } from "rxjs"; import { ParticipantAbstractModel, ParticipantService, TokenModel } from "openvidu-angular"; @@ -34,7 +34,7 @@ import { ParticipantAbstractModel, ParticipantService, TokenModel } from "openvi }) export class AppComponent implements OnInit { - APPLICATION_SERVER_URL = 'http://localhost:5000/'; + APPLICATION_SERVER_URL = environment.applicationServerUrl; sessionId = 'participants-panel-directive-example'; tokens!: TokenModel; diff --git a/openvidu-components/openvidu-custom-participants-panel/src/environments/environment.prod.ts b/openvidu-components/openvidu-custom-participants-panel/src/environments/environment.prod.ts index 3612073b..9a519d17 100644 --- a/openvidu-components/openvidu-custom-participants-panel/src/environments/environment.prod.ts +++ b/openvidu-components/openvidu-custom-participants-panel/src/environments/environment.prod.ts @@ -1,3 +1,4 @@ export const environment = { - production: true + production: true, + applicationServerUrl: '', }; diff --git a/openvidu-components/openvidu-custom-participants-panel/src/environments/environment.ts b/openvidu-components/openvidu-custom-participants-panel/src/environments/environment.ts index f56ff470..26d22290 100644 --- a/openvidu-components/openvidu-custom-participants-panel/src/environments/environment.ts +++ b/openvidu-components/openvidu-custom-participants-panel/src/environments/environment.ts @@ -3,7 +3,8 @@ // The list of file replacements can be found in `angular.json`. export const environment = { - production: false + production: false, + applicationServerUrl: 'http://localhost:5000/', }; /* diff --git a/openvidu-components/openvidu-custom-stream/angular.json b/openvidu-components/openvidu-custom-stream/angular.json index 50d66c6a..5c680c41 100644 --- a/openvidu-components/openvidu-custom-stream/angular.json +++ b/openvidu-components/openvidu-custom-stream/angular.json @@ -66,7 +66,7 @@ { "type": "initial", "maximumWarning": "500kb", - "maximumError": "1mb" + "maximumError": "5mb" }, { "type": "anyComponentStyle", diff --git a/openvidu-components/openvidu-custom-stream/package.json b/openvidu-components/openvidu-custom-stream/package.json index 32ca6e98..35827bd8 100644 --- a/openvidu-components/openvidu-custom-stream/package.json +++ b/openvidu-components/openvidu-custom-stream/package.json @@ -5,7 +5,8 @@ "ng": "ng", "start": "ng serve", "build": "ng build", - "watch": "ng build --watch --configuration development" + "watch": "ng build --watch --configuration development", + "build:prod": "./node_modules/@angular/cli/bin/ng.js build --output-path ./openvidu-basic-node/public/ --configuration production" }, "private": true, "dependencies": { diff --git a/openvidu-components/openvidu-custom-stream/src/app/app.component.ts b/openvidu-components/openvidu-custom-stream/src/app/app.component.ts index d6ffdf4b..0759a8ac 100644 --- a/openvidu-components/openvidu-custom-stream/src/app/app.component.ts +++ b/openvidu-components/openvidu-custom-stream/src/app/app.component.ts @@ -1,5 +1,5 @@ -import { Component, OnInit } from '@angular/core'; import { HttpClient } from "@angular/common/http"; +import { Component, OnInit } from '@angular/core'; import { lastValueFrom } from "rxjs"; import { TokenModel } from 'openvidu-angular'; @@ -25,7 +25,7 @@ import { TokenModel } from 'openvidu-angular'; }) export class AppComponent implements OnInit { - APPLICATION_SERVER_URL = 'http://localhost:5000/'; + APPLICATION_SERVER_URL = environment.applicationServerUrl; sessionId = 'toolbar-directive-example'; tokens!: TokenModel; @@ -45,12 +45,12 @@ export class AppComponent implements OnInit { * -------------------------------------------- * The methods below request the creation of a Session and a Token to * your application server. This keeps your OpenVidu deployment secure. - * + * * In this sample code, there is no user control at all. Anybody could * access your application server endpoints! In a real production * environment, your application server must identify the user to allow * access to the endpoints. - * + * * Visit https://docs.openvidu.io/en/stable/application-server to learn * more about the integration of OpenVidu in your application server. */ diff --git a/openvidu-components/openvidu-custom-stream/src/environments/environment.prod.ts b/openvidu-components/openvidu-custom-stream/src/environments/environment.prod.ts index 3612073b..9a519d17 100644 --- a/openvidu-components/openvidu-custom-stream/src/environments/environment.prod.ts +++ b/openvidu-components/openvidu-custom-stream/src/environments/environment.prod.ts @@ -1,3 +1,4 @@ export const environment = { - production: true + production: true, + applicationServerUrl: '', }; diff --git a/openvidu-components/openvidu-custom-stream/src/environments/environment.ts b/openvidu-components/openvidu-custom-stream/src/environments/environment.ts index f56ff470..26d22290 100644 --- a/openvidu-components/openvidu-custom-stream/src/environments/environment.ts +++ b/openvidu-components/openvidu-custom-stream/src/environments/environment.ts @@ -3,7 +3,8 @@ // The list of file replacements can be found in `angular.json`. export const environment = { - production: false + production: false, + applicationServerUrl: 'http://localhost:5000/', }; /* diff --git a/openvidu-components/openvidu-custom-toolbar/angular.json b/openvidu-components/openvidu-custom-toolbar/angular.json index 46a8e0ab..8bf68ff7 100644 --- a/openvidu-components/openvidu-custom-toolbar/angular.json +++ b/openvidu-components/openvidu-custom-toolbar/angular.json @@ -42,7 +42,7 @@ { "type": "initial", "maximumWarning": "500kb", - "maximumError": "1mb" + "maximumError": "5mb" }, { "type": "anyComponentStyle", diff --git a/openvidu-components/openvidu-custom-toolbar/package.json b/openvidu-components/openvidu-custom-toolbar/package.json index e5c18c3d..04905030 100644 --- a/openvidu-components/openvidu-custom-toolbar/package.json +++ b/openvidu-components/openvidu-custom-toolbar/package.json @@ -6,7 +6,7 @@ "start": "ng serve", "build": "ng build", "watch": "ng build --watch --configuration development", - "test": "ng test" + "build:prod": "./node_modules/@angular/cli/bin/ng.js build --output-path ./openvidu-basic-node/public/ --configuration production" }, "private": true, "dependencies": { diff --git a/openvidu-components/openvidu-custom-toolbar/src/app/app.component.ts b/openvidu-components/openvidu-custom-toolbar/src/app/app.component.ts index c7d5285e..a70768fe 100644 --- a/openvidu-components/openvidu-custom-toolbar/src/app/app.component.ts +++ b/openvidu-components/openvidu-custom-toolbar/src/app/app.component.ts @@ -1,5 +1,5 @@ -import { Component, OnInit } from "@angular/core"; import { HttpClient } from "@angular/common/http"; +import { Component, OnInit } from "@angular/core"; import { lastValueFrom } from "rxjs"; import { OpenViduService, TokenModel } from "openvidu-angular"; @@ -17,7 +17,7 @@ import { OpenViduService, TokenModel } from "openvidu-angular"; }) export class AppComponent implements OnInit { - APPLICATION_SERVER_URL = 'http://localhost:5000/'; + APPLICATION_SERVER_URL = environment.applicationServerUrl; sessionId = 'toolbar-directive-example'; tokens!: TokenModel; @@ -50,12 +50,12 @@ export class AppComponent implements OnInit { * -------------------------------------------- * The methods below request the creation of a Session and a Token to * your application server. This keeps your OpenVidu deployment secure. - * + * * In this sample code, there is no user control at all. Anybody could * access your application server endpoints! In a real production * environment, your application server must identify the user to allow * access to the endpoints. - * + * * Visit https://docs.openvidu.io/en/stable/application-server to learn * more about the integration of OpenVidu in your application server. */ diff --git a/openvidu-components/openvidu-custom-toolbar/src/environments/environment.prod.ts b/openvidu-components/openvidu-custom-toolbar/src/environments/environment.prod.ts index 3612073b..9a519d17 100644 --- a/openvidu-components/openvidu-custom-toolbar/src/environments/environment.prod.ts +++ b/openvidu-components/openvidu-custom-toolbar/src/environments/environment.prod.ts @@ -1,3 +1,4 @@ export const environment = { - production: true + production: true, + applicationServerUrl: '', }; diff --git a/openvidu-components/openvidu-custom-toolbar/src/environments/environment.ts b/openvidu-components/openvidu-custom-toolbar/src/environments/environment.ts index f56ff470..26d22290 100644 --- a/openvidu-components/openvidu-custom-toolbar/src/environments/environment.ts +++ b/openvidu-components/openvidu-custom-toolbar/src/environments/environment.ts @@ -3,7 +3,8 @@ // The list of file replacements can be found in `angular.json`. export const environment = { - production: false + production: false, + applicationServerUrl: 'http://localhost:5000/', }; /* diff --git a/openvidu-components/openvidu-custom-ui/angular.json b/openvidu-components/openvidu-custom-ui/angular.json index 9fc8a126..5ffe3767 100644 --- a/openvidu-components/openvidu-custom-ui/angular.json +++ b/openvidu-components/openvidu-custom-ui/angular.json @@ -42,7 +42,7 @@ { "type": "initial", "maximumWarning": "500kb", - "maximumError": "1mb" + "maximumError": "5mb" }, { "type": "anyComponentStyle", diff --git a/openvidu-components/openvidu-custom-ui/openvidu-basic-node/.dockerignore b/openvidu-components/openvidu-custom-ui/openvidu-basic-node/.dockerignore new file mode 100644 index 00000000..deb26487 --- /dev/null +++ b/openvidu-components/openvidu-custom-ui/openvidu-basic-node/.dockerignore @@ -0,0 +1 @@ +docker/ \ No newline at end of file diff --git a/openvidu-components/openvidu-custom-ui/openvidu-basic-node/.env b/openvidu-components/openvidu-custom-ui/openvidu-basic-node/.env new file mode 100644 index 00000000..76dfb4e8 --- /dev/null +++ b/openvidu-components/openvidu-custom-ui/openvidu-basic-node/.env @@ -0,0 +1,3 @@ +SERVER_PORT=5000 +OPENVIDU_URL=http://localhost:4443/ +OPENVIDU_SECRET=MY_SECRET \ No newline at end of file diff --git a/openvidu-components/openvidu-custom-ui/openvidu-basic-node/.gitignore b/openvidu-components/openvidu-custom-ui/openvidu-basic-node/.gitignore new file mode 100644 index 00000000..fa6a20f5 --- /dev/null +++ b/openvidu-components/openvidu-custom-ui/openvidu-basic-node/.gitignore @@ -0,0 +1,129 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp +.cache + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* \ No newline at end of file diff --git a/openvidu-components/openvidu-custom-ui/openvidu-basic-node/README.md b/openvidu-components/openvidu-custom-ui/openvidu-basic-node/README.md new file mode 100644 index 00000000..1e2d3c71 --- /dev/null +++ b/openvidu-components/openvidu-custom-ui/openvidu-basic-node/README.md @@ -0,0 +1,30 @@ +# openvidu-basic-node + +This is a minimal OpenVidu server application sample built for Node with Express. Visit [Application server](https://docs.openvidu.io/en/stable/application-server/) documentation for further context. + +It internally uses [openvidu-node-client SDK](https://docs.openvidu.io/en/stable/reference-docs/openvidu-node-client/). + +## Prerequisites + +- [Node](https://nodejs.org/es/download/) + +## Run + +Download repository + +``` +git clone git@github.com:OpenVidu/openvidu-tutorials.git +cd openvidu-tutorials/openvidu-basic-node +``` + +Install dependencies + +``` +npm install +``` + +Run the application + +``` +node index.js +``` \ No newline at end of file diff --git a/openvidu-components/openvidu-custom-ui/openvidu-basic-node/docker/Dockerfile b/openvidu-components/openvidu-custom-ui/openvidu-basic-node/docker/Dockerfile new file mode 100644 index 00000000..f63e614e --- /dev/null +++ b/openvidu-components/openvidu-custom-ui/openvidu-basic-node/docker/Dockerfile @@ -0,0 +1,11 @@ +FROM node:16-alpine3.16 + +# Copy openvidu-basic-node +COPY . /opt/openvidu-basic-node + +# Install openvidu-basic-node dependencies +RUN npm --prefix /opt/openvidu-basic-node install + +WORKDIR /opt/openvidu-basic-node + +ENTRYPOINT [ "node", "index.js" ] \ No newline at end of file diff --git a/openvidu-components/openvidu-custom-ui/openvidu-basic-node/docker/create_image.sh b/openvidu-components/openvidu-custom-ui/openvidu-basic-node/docker/create_image.sh new file mode 100755 index 00000000..66b0a40f --- /dev/null +++ b/openvidu-components/openvidu-custom-ui/openvidu-basic-node/docker/create_image.sh @@ -0,0 +1,9 @@ +#!/bin/bash +if [ $# -eq 0 ]; then + echo "No version argument provided. Usage: \"./create_image.sh X.Y.Z\"" + exit 1 +fi + +pushd ../ + +docker build --pull --no-cache --rm=true -f docker/Dockerfile -t "$1" . \ No newline at end of file diff --git a/openvidu-components/openvidu-custom-ui/openvidu-basic-node/index.js b/openvidu-components/openvidu-custom-ui/openvidu-basic-node/index.js new file mode 100644 index 00000000..73193b15 --- /dev/null +++ b/openvidu-components/openvidu-custom-ui/openvidu-basic-node/index.js @@ -0,0 +1,57 @@ +require("dotenv").config(!!process.env.CONFIG ? {path: process.env.CONFIG} : {}); +var express = require("express"); +var bodyParser = require("body-parser"); +var http = require("http"); +var OpenVidu = require("openvidu-node-client").OpenVidu; +var cors = require("cors"); +var app = express(); + +// Environment variable: PORT where the node server is listening +var SERVER_PORT = process.env.SERVER_PORT || 5000; +// Environment variable: URL where our OpenVidu server is listening +var OPENVIDU_URL = process.env.OPENVIDU_URL || 'http://localhost:4443'; +// Environment variable: secret shared with our OpenVidu server +var OPENVIDU_SECRET = process.env.OPENVIDU_SECRET || 'MY_SECRET'; + +// Enable CORS support +app.use( + cors({ + origin: "*", + }) +); + +var server = http.createServer(app); +var openvidu = new OpenVidu(OPENVIDU_URL, OPENVIDU_SECRET); + +// Allow application/x-www-form-urlencoded +app.use(bodyParser.urlencoded({ extended: true })); +// Allow application/json +app.use(bodyParser.json()); + +// Serve static resources if available +app.use(express.static(__dirname + '/public')); + +// Serve application +server.listen(SERVER_PORT, () => { + console.log("Application started on port: ", SERVER_PORT); + console.warn('Application server connecting to OpenVidu at ' + OPENVIDU_URL); +}); + +app.post("/api/sessions", async (req, res) => { + var session = await openvidu.createSession(req.body); + res.send(session.sessionId); +}); + +app.post("/api/sessions/:sessionId/connections", async (req, res) => { + var session = openvidu.activeSessions.find( + (s) => s.sessionId === req.params.sessionId + ); + if (!session) { + res.status(404).send(); + } else { + var connection = await session.createConnection(req.body); + res.send(connection.token); + } +}); + +process.on('uncaughtException', err => console.error(err)); \ No newline at end of file diff --git a/openvidu-components/openvidu-custom-ui/openvidu-basic-node/package-lock.json b/openvidu-components/openvidu-custom-ui/openvidu-basic-node/package-lock.json new file mode 100644 index 00000000..9d13455f --- /dev/null +++ b/openvidu-components/openvidu-custom-ui/openvidu-basic-node/package-lock.json @@ -0,0 +1,1273 @@ +{ + "name": "openvidu-basic-node", + "version": "2.25.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "openvidu-basic-node", + "version": "2.25.0", + "dependencies": { + "body-parser": "1.20.0", + "cors": "2.8.5", + "dotenv": "16.0.1", + "express": "4.18.1", + "openvidu-node-client": "2.25.0" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "dependencies": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/body-parser": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", + "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.10.3", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/dotenv": { + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.1.tgz", + "integrity": "sha512-1K6hR6wtk2FviQ4kEiSjFiH5rpzEVi8WW0x96aztHVMhEspNpc4DVOUTEHtEva5VThQ8IaBX1Pe4gSzpVVUsKQ==", + "engines": { + "node": ">=12" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz", + "integrity": "sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.0", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.10.3", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/get-intrinsic": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/openvidu-node-client": { + "version": "2.25.0", + "resolved": "https://registry.npmjs.org/openvidu-node-client/-/openvidu-node-client-2.25.0.tgz", + "integrity": "sha512-EWKPnUL/ooJTJr0vy6Cf5Cs+8F7pNuRZR0cbL6Bk0wBAn2zXtUhCKvudE5Uq5BZM+XX87FJ7b5N/UV+K+GEr6Q==", + "dependencies": { + "axios": "0.27.2", + "buffer": "6.0.3" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", + "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + } + }, + "dependencies": { + "accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "requires": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + } + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "requires": { + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "body-parser": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", + "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==", + "requires": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.10.3", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + } + }, + "buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "requires": { + "safe-buffer": "5.2.1" + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" + }, + "destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" + }, + "dotenv": { + "version": "16.0.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.1.tgz", + "integrity": "sha512-1K6hR6wtk2FviQ4kEiSjFiH5rpzEVi8WW0x96aztHVMhEspNpc4DVOUTEHtEva5VThQ8IaBX1Pe4gSzpVVUsKQ==" + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==" + }, + "express": { + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz", + "integrity": "sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==", + "requires": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.0", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.10.3", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + } + }, + "finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + } + }, + "follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-intrinsic": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" + }, + "http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "requires": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==" + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==" + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" + }, + "object-inspect": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==" + }, + "on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "requires": { + "ee-first": "1.1.1" + } + }, + "openvidu-node-client": { + "version": "2.25.0", + "resolved": "https://registry.npmjs.org/openvidu-node-client/-/openvidu-node-client-2.25.0.tgz", + "integrity": "sha512-EWKPnUL/ooJTJr0vy6Cf5Cs+8F7pNuRZR0cbL6Bk0wBAn2zXtUhCKvudE5Uq5BZM+XX87FJ7b5N/UV+K+GEr6Q==", + "requires": { + "axios": "0.27.2", + "buffer": "6.0.3" + } + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "requires": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + } + }, + "qs": { + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", + "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + }, + "raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "requires": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "requires": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "dependencies": { + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + } + } + }, + "serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + } + }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" + }, + "toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==" + } + } +} diff --git a/openvidu-components/openvidu-custom-ui/openvidu-basic-node/package.json b/openvidu-components/openvidu-custom-ui/openvidu-basic-node/package.json new file mode 100644 index 00000000..e0ae5063 --- /dev/null +++ b/openvidu-components/openvidu-custom-ui/openvidu-basic-node/package.json @@ -0,0 +1,12 @@ +{ + "name": "openvidu-basic-node", + "version": "2.25.0", + "main": "index.js", + "dependencies": { + "body-parser": "1.20.0", + "cors": "2.8.5", + "dotenv": "16.0.1", + "express": "4.18.1", + "openvidu-node-client": "2.25.0" + } +} diff --git a/openvidu-components/openvidu-custom-ui/package.json b/openvidu-components/openvidu-custom-ui/package.json index 053a5030..482abaef 100644 --- a/openvidu-components/openvidu-custom-ui/package.json +++ b/openvidu-components/openvidu-custom-ui/package.json @@ -6,7 +6,7 @@ "start": "ng serve", "build": "ng build", "watch": "ng build --watch --configuration development", - "test": "ng test" + "build:prod": "./node_modules/@angular/cli/bin/ng.js build --output-path ./openvidu-basic-node/public/ --configuration production" }, "private": true, "dependencies": { diff --git a/openvidu-components/openvidu-custom-ui/src/app/app.component.ts b/openvidu-components/openvidu-custom-ui/src/app/app.component.ts index 1ac2af24..1147aae3 100644 --- a/openvidu-components/openvidu-custom-ui/src/app/app.component.ts +++ b/openvidu-components/openvidu-custom-ui/src/app/app.component.ts @@ -1,8 +1,9 @@ -import { Component } from "@angular/core"; import { HttpClient } from "@angular/common/http"; +import { Component } from "@angular/core"; import { lastValueFrom } from "rxjs"; import { TokenModel } from "openvidu-angular"; +import { environment } from 'src/environments/environment'; @Component({ selector: 'app-root', @@ -11,7 +12,7 @@ import { TokenModel } from "openvidu-angular"; }) export class AppComponent { - APPLICATION_SERVER_URL = 'http://localhost:5000/'; + APPLICATION_SERVER_URL = environment.applicationServerUrl; sessionId = 'openvidu-custom-ui'; tokens!: TokenModel; @@ -31,12 +32,12 @@ export class AppComponent { * -------------------------------------------- * The methods below request the creation of a Session and a Token to * your application server. This keeps your OpenVidu deployment secure. - * + * * In this sample code, there is no user control at all. Anybody could * access your application server endpoints! In a real production * environment, your application server must identify the user to allow * access to the endpoints. - * + * * Visit https://docs.openvidu.io/en/stable/application-server to learn * more about the integration of OpenVidu in your application server. */ diff --git a/openvidu-components/openvidu-custom-ui/src/environments/environment.prod.ts b/openvidu-components/openvidu-custom-ui/src/environments/environment.prod.ts index 3612073b..9a519d17 100644 --- a/openvidu-components/openvidu-custom-ui/src/environments/environment.prod.ts +++ b/openvidu-components/openvidu-custom-ui/src/environments/environment.prod.ts @@ -1,3 +1,4 @@ export const environment = { - production: true + production: true, + applicationServerUrl: '', }; diff --git a/openvidu-components/openvidu-custom-ui/src/environments/environment.ts b/openvidu-components/openvidu-custom-ui/src/environments/environment.ts index f56ff470..26d22290 100644 --- a/openvidu-components/openvidu-custom-ui/src/environments/environment.ts +++ b/openvidu-components/openvidu-custom-ui/src/environments/environment.ts @@ -3,7 +3,8 @@ // The list of file replacements can be found in `angular.json`. export const environment = { - production: false + production: false, + applicationServerUrl: 'http://localhost:5000/', }; /* diff --git a/openvidu-components/openvidu-toggle-hand/package.json b/openvidu-components/openvidu-toggle-hand/package.json index f5a80e25..c2d40bdc 100644 --- a/openvidu-components/openvidu-toggle-hand/package.json +++ b/openvidu-components/openvidu-toggle-hand/package.json @@ -5,9 +5,7 @@ "ng": "ng", "start": "ng serve --configuration development", "build": "ng build", - "test": "ng test", - "lint": "ng lint", - "e2e": "ng e2e" + "build:prod": "./node_modules/@angular/cli/bin/ng.js build --output-path ./openvidu-basic-node/public/ --configuration production" }, "private": true, "dependencies": { diff --git a/openvidu-components/openvidu-toggle-hand/src/app/app.component.ts b/openvidu-components/openvidu-toggle-hand/src/app/app.component.ts index 90b54e02..292682af 100644 --- a/openvidu-components/openvidu-toggle-hand/src/app/app.component.ts +++ b/openvidu-components/openvidu-toggle-hand/src/app/app.component.ts @@ -1,12 +1,13 @@ -import { Component, OnInit } from "@angular/core"; +import { animate, style, transition, trigger } from "@angular/animations"; import { HttpClient } from "@angular/common/http"; -import { trigger, transition, style, animate } from "@angular/animations"; +import { Component, OnInit } from "@angular/core"; import { lastValueFrom } from "rxjs"; -import { ParticipantService, OpenViduService } from "openvidu-angular"; +import { OpenViduService, ParticipantService } from "openvidu-angular"; import { ParticipantAppModel } from "./models/participant-app.model"; import { Session, SignalOptions } from "openvidu-browser"; +import { environment } from 'src/environments/environment'; enum SignalApp { HAND_TOGGLE = 'handToggle' @@ -31,7 +32,7 @@ enum SignalApp { }) export class AppComponent implements OnInit { - APPLICATION_SERVER_URL = 'http://localhost:5000/'; + APPLICATION_SERVER_URL = environment.applicationServerUrl; tokens: { webcam: string; screen: string }; hasHandRaised: boolean = false; @@ -91,12 +92,12 @@ export class AppComponent implements OnInit { * -------------------------------------------- * The methods below request the creation of a Session and a Token to * your application server. This keeps your OpenVidu deployment secure. - * + * * In this sample code, there is no user control at all. Anybody could * access your application server endpoints! In a real production * environment, your application server must identify the user to allow * access to the endpoints. - * + * * Visit https://docs.openvidu.io/en/stable/application-server to learn * more about the integration of OpenVidu in your application server. */ diff --git a/openvidu-components/openvidu-toggle-hand/src/environments/environment.prod.ts b/openvidu-components/openvidu-toggle-hand/src/environments/environment.prod.ts index 3612073b..9a519d17 100644 --- a/openvidu-components/openvidu-toggle-hand/src/environments/environment.prod.ts +++ b/openvidu-components/openvidu-toggle-hand/src/environments/environment.prod.ts @@ -1,3 +1,4 @@ export const environment = { - production: true + production: true, + applicationServerUrl: '', }; diff --git a/openvidu-components/openvidu-toggle-hand/src/environments/environment.ts b/openvidu-components/openvidu-toggle-hand/src/environments/environment.ts index 7b4f817a..b6fac4e8 100644 --- a/openvidu-components/openvidu-toggle-hand/src/environments/environment.ts +++ b/openvidu-components/openvidu-toggle-hand/src/environments/environment.ts @@ -3,7 +3,8 @@ // The list of file replacements can be found in `angular.json`. export const environment = { - production: false + production: false, + applicationServerUrl: 'http://localhost:5000/', }; /* diff --git a/openvidu-components/openvidu-toolbar-buttons/angular.json b/openvidu-components/openvidu-toolbar-buttons/angular.json index 89d9580c..d691c55c 100644 --- a/openvidu-components/openvidu-toolbar-buttons/angular.json +++ b/openvidu-components/openvidu-toolbar-buttons/angular.json @@ -66,7 +66,7 @@ { "type": "initial", "maximumWarning": "500kb", - "maximumError": "1mb" + "maximumError": "5mb" }, { "type": "anyComponentStyle", diff --git a/openvidu-components/openvidu-toolbar-buttons/package.json b/openvidu-components/openvidu-toolbar-buttons/package.json index b7335470..5a86a430 100644 --- a/openvidu-components/openvidu-toolbar-buttons/package.json +++ b/openvidu-components/openvidu-toolbar-buttons/package.json @@ -5,7 +5,8 @@ "ng": "ng", "start": "ng serve", "build": "ng build", - "watch": "ng build --watch --configuration development" + "watch": "ng build --watch --configuration development", + "build:prod": "./node_modules/@angular/cli/bin/ng.js build --output-path ./openvidu-basic-node/public/ --configuration production" }, "private": true, "dependencies": { diff --git a/openvidu-components/openvidu-toolbar-buttons/src/app/app.component.ts b/openvidu-components/openvidu-toolbar-buttons/src/app/app.component.ts index 59ace5ba..f8275911 100644 --- a/openvidu-components/openvidu-toolbar-buttons/src/app/app.component.ts +++ b/openvidu-components/openvidu-toolbar-buttons/src/app/app.component.ts @@ -1,8 +1,9 @@ -import { Component, OnInit } from "@angular/core"; import { HttpClient } from "@angular/common/http"; +import { Component, OnInit } from "@angular/core"; import { lastValueFrom } from "rxjs"; -import { TokenModel, OpenViduService, ParticipantService } from "openvidu-angular"; +import { OpenViduService, ParticipantService, TokenModel } from "openvidu-angular"; +import { environment } from 'src/environments/environment'; @Component({ selector: 'app-root', @@ -22,7 +23,7 @@ import { TokenModel, OpenViduService, ParticipantService } from "openvidu-angula }) export class AppComponent implements OnInit { - APPLICATION_SERVER_URL = 'http://localhost:5000/'; + APPLICATION_SERVER_URL = environment.applicationServerUrl; sessionId = 'toolbar-additionalbtn-directive-example'; tokens!: TokenModel; @@ -56,12 +57,12 @@ export class AppComponent implements OnInit { * -------------------------------------------- * The methods below request the creation of a Session and a Token to * your application server. This keeps your OpenVidu deployment secure. - * + * * In this sample code, there is no user control at all. Anybody could * access your application server endpoints! In a real production * environment, your application server must identify the user to allow * access to the endpoints. - * + * * Visit https://docs.openvidu.io/en/stable/application-server to learn * more about the integration of OpenVidu in your application server. */ diff --git a/openvidu-components/openvidu-toolbar-buttons/src/environments/environment.prod.ts b/openvidu-components/openvidu-toolbar-buttons/src/environments/environment.prod.ts index 3612073b..9a519d17 100644 --- a/openvidu-components/openvidu-toolbar-buttons/src/environments/environment.prod.ts +++ b/openvidu-components/openvidu-toolbar-buttons/src/environments/environment.prod.ts @@ -1,3 +1,4 @@ export const environment = { - production: true + production: true, + applicationServerUrl: '', }; diff --git a/openvidu-components/openvidu-toolbar-buttons/src/environments/environment.ts b/openvidu-components/openvidu-toolbar-buttons/src/environments/environment.ts index f56ff470..26d22290 100644 --- a/openvidu-components/openvidu-toolbar-buttons/src/environments/environment.ts +++ b/openvidu-components/openvidu-toolbar-buttons/src/environments/environment.ts @@ -3,7 +3,8 @@ // The list of file replacements can be found in `angular.json`. export const environment = { - production: false + production: false, + applicationServerUrl: 'http://localhost:5000/', }; /* diff --git a/openvidu-components/openvidu-toolbar-panel-buttons/angular.json b/openvidu-components/openvidu-toolbar-panel-buttons/angular.json index 642e0047..a37fb63d 100644 --- a/openvidu-components/openvidu-toolbar-panel-buttons/angular.json +++ b/openvidu-components/openvidu-toolbar-panel-buttons/angular.json @@ -66,7 +66,7 @@ { "type": "initial", "maximumWarning": "500kb", - "maximumError": "1mb" + "maximumError": "5mb" }, { "type": "anyComponentStyle", diff --git a/openvidu-components/openvidu-toolbar-panel-buttons/package.json b/openvidu-components/openvidu-toolbar-panel-buttons/package.json index b537ea10..4c483d2b 100644 --- a/openvidu-components/openvidu-toolbar-panel-buttons/package.json +++ b/openvidu-components/openvidu-toolbar-panel-buttons/package.json @@ -5,7 +5,8 @@ "ng": "ng", "start": "ng serve", "build": "ng build", - "watch": "ng build --watch --configuration development" + "watch": "ng build --watch --configuration development", + "build:prod": "./node_modules/@angular/cli/bin/ng.js build --output-path ./openvidu-basic-node/public/ --configuration production" }, "private": true, "dependencies": { diff --git a/openvidu-components/openvidu-toolbar-panel-buttons/src/app/app.component.ts b/openvidu-components/openvidu-toolbar-panel-buttons/src/app/app.component.ts index a712cd5d..bc7de29c 100644 --- a/openvidu-components/openvidu-toolbar-panel-buttons/src/app/app.component.ts +++ b/openvidu-components/openvidu-toolbar-panel-buttons/src/app/app.component.ts @@ -1,8 +1,9 @@ -import { Component, OnInit } from "@angular/core"; import { HttpClient } from "@angular/common/http"; +import { Component, OnInit } from "@angular/core"; import { lastValueFrom } from "rxjs"; import { TokenModel } from "openvidu-angular"; +import { environment } from 'src/environments/environment'; @Component({ selector: "app-root", @@ -17,7 +18,7 @@ import { TokenModel } from "openvidu-angular"; }) export class AppComponent implements OnInit { - APPLICATION_SERVER_URL = 'http://localhost:5000/'; + APPLICATION_SERVER_URL = environment.applicationServerUrl; sessionId = "toolbar-additionalPanelbtn"; tokens!: TokenModel; @@ -41,12 +42,12 @@ export class AppComponent implements OnInit { * -------------------------------------------- * The methods below request the creation of a Session and a Token to * your application server. This keeps your OpenVidu deployment secure. - * + * * In this sample code, there is no user control at all. Anybody could * access your application server endpoints! In a real production * environment, your application server must identify the user to allow * access to the endpoints. - * + * * Visit https://docs.openvidu.io/en/stable/application-server to learn * more about the integration of OpenVidu in your application server. */ diff --git a/openvidu-components/openvidu-toolbar-panel-buttons/src/environments/environment.prod.ts b/openvidu-components/openvidu-toolbar-panel-buttons/src/environments/environment.prod.ts index 3612073b..9a519d17 100644 --- a/openvidu-components/openvidu-toolbar-panel-buttons/src/environments/environment.prod.ts +++ b/openvidu-components/openvidu-toolbar-panel-buttons/src/environments/environment.prod.ts @@ -1,3 +1,4 @@ export const environment = { - production: true + production: true, + applicationServerUrl: '', }; diff --git a/openvidu-components/openvidu-toolbar-panel-buttons/src/environments/environment.ts b/openvidu-components/openvidu-toolbar-panel-buttons/src/environments/environment.ts index f56ff470..26d22290 100644 --- a/openvidu-components/openvidu-toolbar-panel-buttons/src/environments/environment.ts +++ b/openvidu-components/openvidu-toolbar-panel-buttons/src/environments/environment.ts @@ -3,7 +3,8 @@ // The list of file replacements can be found in `angular.json`. export const environment = { - production: false + production: false, + applicationServerUrl: 'http://localhost:5000/', }; /*