Added dockerfile to openvidu-components tutorials
This commit is contained in:
parent
26cfa7d45c
commit
74ef061bdd
@ -1,5 +1,4 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true,
|
production: true,
|
||||||
applicationServerUrl: '',
|
applicationServerUrl: '',
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
2
openvidu-components/.dockerignore
Normal file
2
openvidu-components/.dockerignore
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
**/node_modules
|
||||||
|
**/.angular
|
||||||
25
openvidu-components/docker/Dockerfile
Normal file
25
openvidu-components/docker/Dockerfile
Normal file
@ -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" ]
|
||||||
28
openvidu-components/docker/create_image.sh
Executable file
28
openvidu-components/docker/create_image.sh
Executable file
@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
if [ $# -eq 0 ]; then
|
||||||
|
echo "No version argument provided. Usage: \"./create_image.sh <IMAGE_NAME> <TUTORIAL_NAME>\""
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $# -eq 1 ]; then
|
||||||
|
echo "No tutorial argument provided. Usage: \"./create_image.sh <IMAGE_NAME> <TUTORIAL_NAME>\""
|
||||||
|
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
|
||||||
|
|
||||||
3
openvidu-components/docker/entrypoint.sh
Executable file
3
openvidu-components/docker/entrypoint.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
exec node index.js "$*"
|
||||||
@ -10,7 +10,6 @@ TUTORIALS=(
|
|||||||
'openvidu-custom-participants-panel'
|
'openvidu-custom-participants-panel'
|
||||||
'openvidu-custom-stream'
|
'openvidu-custom-stream'
|
||||||
'openvidu-custom-toolbar'
|
'openvidu-custom-toolbar'
|
||||||
'openvidu-custom-toolbar'
|
|
||||||
'openvidu-custom-ui'
|
'openvidu-custom-ui'
|
||||||
'openvidu-toggle-hand'
|
'openvidu-toggle-hand'
|
||||||
'openvidu-toolbar-buttons'
|
'openvidu-toolbar-buttons'
|
||||||
|
|||||||
@ -66,7 +66,7 @@
|
|||||||
{
|
{
|
||||||
"type": "initial",
|
"type": "initial",
|
||||||
"maximumWarning": "500kb",
|
"maximumWarning": "500kb",
|
||||||
"maximumError": "1mb"
|
"maximumError": "5mb"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "anyComponentStyle",
|
"type": "anyComponentStyle",
|
||||||
|
|||||||
@ -5,7 +5,9 @@
|
|||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"build": "ng build",
|
"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,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
import { Component } from "@angular/core";
|
|
||||||
import { HttpClient } from "@angular/common/http";
|
import { HttpClient } from "@angular/common/http";
|
||||||
|
import { Component } from "@angular/core";
|
||||||
import { lastValueFrom } from "rxjs";
|
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({
|
@Component({
|
||||||
selector: "app-root",
|
selector: "app-root",
|
||||||
@ -49,7 +50,7 @@ import { TokenModel, PanelService, PanelType } from "openvidu-angular";
|
|||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
|
|
||||||
APPLICATION_SERVER_URL = 'http://localhost:5000/';
|
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||||
|
|
||||||
sessionId = "toolbar-additionalbtn-directive-example";
|
sessionId = "toolbar-additionalbtn-directive-example";
|
||||||
tokens!: TokenModel;
|
tokens!: TokenModel;
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true
|
production: true,
|
||||||
|
applicationServerUrl: '',
|
||||||
};
|
};
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
// The list of file replacements can be found in `angular.json`.
|
// The list of file replacements can be found in `angular.json`.
|
||||||
|
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: false
|
production: false,
|
||||||
|
applicationServerUrl: 'http://localhost:5000/',
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -39,7 +39,7 @@
|
|||||||
{
|
{
|
||||||
"type": "initial",
|
"type": "initial",
|
||||||
"maximumWarning": "500kb",
|
"maximumWarning": "500kb",
|
||||||
"maximumError": "1mb"
|
"maximumError": "5mb"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "anyComponentStyle",
|
"type": "anyComponentStyle",
|
||||||
|
|||||||
@ -5,7 +5,8 @@
|
|||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"build": "ng build",
|
"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,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -66,7 +66,7 @@
|
|||||||
{
|
{
|
||||||
"type": "initial",
|
"type": "initial",
|
||||||
"maximumWarning": "500kb",
|
"maximumWarning": "500kb",
|
||||||
"maximumError": "1mb"
|
"maximumError": "5mb"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "anyComponentStyle",
|
"type": "anyComponentStyle",
|
||||||
|
|||||||
@ -5,7 +5,8 @@
|
|||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"build": "ng build",
|
"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,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
import { Component, OnInit } from "@angular/core";
|
|
||||||
import { HttpClient } from "@angular/common/http";
|
import { HttpClient } from "@angular/common/http";
|
||||||
|
import { Component, OnInit } from "@angular/core";
|
||||||
import { lastValueFrom } from "rxjs";
|
import { lastValueFrom } from "rxjs";
|
||||||
|
|
||||||
import { TokenModel } from "openvidu-angular";
|
import { TokenModel } from "openvidu-angular";
|
||||||
|
import { environment } from 'src/environments/environment';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-root",
|
selector: "app-root",
|
||||||
@ -30,7 +31,7 @@ import { TokenModel } from "openvidu-angular";
|
|||||||
})
|
})
|
||||||
export class AppComponent implements OnInit {
|
export class AppComponent implements OnInit {
|
||||||
|
|
||||||
APPLICATION_SERVER_URL = 'http://localhost:5000/';
|
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||||
|
|
||||||
sessionId = "activities-panel-directive-example";
|
sessionId = "activities-panel-directive-example";
|
||||||
tokens!: TokenModel;
|
tokens!: TokenModel;
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true
|
production: true,
|
||||||
|
applicationServerUrl: '',
|
||||||
};
|
};
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
// The list of file replacements can be found in `angular.json`.
|
// The list of file replacements can be found in `angular.json`.
|
||||||
|
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: false
|
production: false,
|
||||||
|
applicationServerUrl: 'http://localhost:5000/',
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -66,7 +66,7 @@
|
|||||||
{
|
{
|
||||||
"type": "initial",
|
"type": "initial",
|
||||||
"maximumWarning": "500kb",
|
"maximumWarning": "500kb",
|
||||||
"maximumError": "1mb"
|
"maximumError": "5mb"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "anyComponentStyle",
|
"type": "anyComponentStyle",
|
||||||
|
|||||||
@ -5,7 +5,8 @@
|
|||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"build": "ng build",
|
"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,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
import { Component, OnInit } from "@angular/core";
|
|
||||||
import { HttpClient } from "@angular/common/http";
|
import { HttpClient } from "@angular/common/http";
|
||||||
|
import { Component, OnInit } from "@angular/core";
|
||||||
import { lastValueFrom } from "rxjs";
|
import { lastValueFrom } from "rxjs";
|
||||||
|
|
||||||
import { TokenModel, Signal } from "openvidu-angular";
|
import { Signal, TokenModel } from "openvidu-angular";
|
||||||
import { Session, SignalOptions } from "openvidu-browser";
|
import { Session, SignalOptions } from "openvidu-browser";
|
||||||
|
import { environment } from 'src/environments/environment';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-root",
|
selector: "app-root",
|
||||||
@ -35,7 +36,7 @@ import { Session, SignalOptions } from "openvidu-browser";
|
|||||||
})
|
})
|
||||||
export class AppComponent implements OnInit {
|
export class AppComponent implements OnInit {
|
||||||
|
|
||||||
APPLICATION_SERVER_URL = 'http://localhost:5000/';
|
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||||
|
|
||||||
sessionId = "chat-panel-directive-example";
|
sessionId = "chat-panel-directive-example";
|
||||||
tokens!: TokenModel;
|
tokens!: TokenModel;
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true
|
production: true,
|
||||||
|
applicationServerUrl: '',
|
||||||
};
|
};
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
// The list of file replacements can be found in `angular.json`.
|
// The list of file replacements can be found in `angular.json`.
|
||||||
|
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: false
|
production: false,
|
||||||
|
applicationServerUrl: 'http://localhost:5000/',
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -66,7 +66,7 @@
|
|||||||
{
|
{
|
||||||
"type": "initial",
|
"type": "initial",
|
||||||
"maximumWarning": "500kb",
|
"maximumWarning": "500kb",
|
||||||
"maximumError": "1mb"
|
"maximumError": "5mb"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "anyComponentStyle",
|
"type": "anyComponentStyle",
|
||||||
|
|||||||
@ -5,7 +5,8 @@
|
|||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"build": "ng build",
|
"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,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
import { Component, OnInit } from "@angular/core";
|
|
||||||
import { HttpClient } from "@angular/common/http";
|
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({
|
@Component({
|
||||||
selector: "app-root",
|
selector: "app-root",
|
||||||
@ -35,7 +36,7 @@ import { TokenModel, ParticipantService, ParticipantAbstractModel } from "openvi
|
|||||||
})
|
})
|
||||||
export class AppComponent implements OnInit {
|
export class AppComponent implements OnInit {
|
||||||
|
|
||||||
APPLICATION_SERVER_URL = 'http://localhost:5000/';
|
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||||
|
|
||||||
sessionId = 'layout-directive-example';
|
sessionId = 'layout-directive-example';
|
||||||
tokens!: TokenModel;
|
tokens!: TokenModel;
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true
|
production: true,
|
||||||
|
applicationServerUrl: '',
|
||||||
};
|
};
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
// The list of file replacements can be found in `angular.json`.
|
// The list of file replacements can be found in `angular.json`.
|
||||||
|
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: false
|
production: false,
|
||||||
|
applicationServerUrl: 'http://localhost:5000/',
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -66,7 +66,7 @@
|
|||||||
{
|
{
|
||||||
"type": "initial",
|
"type": "initial",
|
||||||
"maximumWarning": "500kb",
|
"maximumWarning": "500kb",
|
||||||
"maximumError": "1mb"
|
"maximumError": "5mb"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "anyComponentStyle",
|
"type": "anyComponentStyle",
|
||||||
|
|||||||
@ -5,7 +5,8 @@
|
|||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"build": "ng build",
|
"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,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
import { Component, OnInit } from "@angular/core";
|
|
||||||
import { HttpClient } from "@angular/common/http";
|
import { HttpClient } from "@angular/common/http";
|
||||||
|
import { Component, OnInit } from "@angular/core";
|
||||||
import { lastValueFrom } from "rxjs";
|
import { lastValueFrom } from "rxjs";
|
||||||
|
|
||||||
import { TokenModel } from "openvidu-angular";
|
import { TokenModel } from "openvidu-angular";
|
||||||
|
import { environment } from 'src/environments/environment';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-root",
|
selector: "app-root",
|
||||||
@ -33,7 +34,7 @@ import { TokenModel } from "openvidu-angular";
|
|||||||
})
|
})
|
||||||
export class AppComponent implements OnInit {
|
export class AppComponent implements OnInit {
|
||||||
|
|
||||||
APPLICATION_SERVER_URL = 'http://localhost:5000/';
|
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||||
|
|
||||||
sessionId = "panel-directive-example";
|
sessionId = "panel-directive-example";
|
||||||
tokens!: TokenModel;
|
tokens!: TokenModel;
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true
|
production: true,
|
||||||
|
applicationServerUrl: '',
|
||||||
};
|
};
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
// The list of file replacements can be found in `angular.json`.
|
// The list of file replacements can be found in `angular.json`.
|
||||||
|
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: false
|
production: false,
|
||||||
|
applicationServerUrl: 'http://localhost:5000/',
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -66,7 +66,7 @@
|
|||||||
{
|
{
|
||||||
"type": "initial",
|
"type": "initial",
|
||||||
"maximumWarning": "500kb",
|
"maximumWarning": "500kb",
|
||||||
"maximumError": "1mb"
|
"maximumError": "5mb"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "anyComponentStyle",
|
"type": "anyComponentStyle",
|
||||||
|
|||||||
@ -5,7 +5,8 @@
|
|||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"build": "ng build",
|
"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,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
import { Component, OnInit } from "@angular/core";
|
|
||||||
import { HttpClient } from "@angular/common/http";
|
import { HttpClient } from "@angular/common/http";
|
||||||
|
import { Component, OnInit } from "@angular/core";
|
||||||
import { lastValueFrom } from "rxjs";
|
import { lastValueFrom } from "rxjs";
|
||||||
|
|
||||||
import { TokenModel, OpenViduService } from "openvidu-angular";
|
import { OpenViduService, TokenModel } from "openvidu-angular";
|
||||||
|
import { environment } from 'src/environments/environment';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-root",
|
selector: "app-root",
|
||||||
@ -23,7 +24,7 @@ import { TokenModel, OpenViduService } from "openvidu-angular";
|
|||||||
})
|
})
|
||||||
export class AppComponent implements OnInit {
|
export class AppComponent implements OnInit {
|
||||||
|
|
||||||
APPLICATION_SERVER_URL = 'http://localhost:5000/';
|
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||||
|
|
||||||
sessionId = "participants-panel-directive-example";
|
sessionId = "participants-panel-directive-example";
|
||||||
tokens!: TokenModel;
|
tokens!: TokenModel;
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true
|
production: true,
|
||||||
|
applicationServerUrl: '',
|
||||||
};
|
};
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
// The list of file replacements can be found in `angular.json`.
|
// The list of file replacements can be found in `angular.json`.
|
||||||
|
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: false
|
production: false,
|
||||||
|
applicationServerUrl: 'http://localhost:5000/',
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -66,7 +66,7 @@
|
|||||||
{
|
{
|
||||||
"type": "initial",
|
"type": "initial",
|
||||||
"maximumWarning": "500kb",
|
"maximumWarning": "500kb",
|
||||||
"maximumError": "1mb"
|
"maximumError": "5mb"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "anyComponentStyle",
|
"type": "anyComponentStyle",
|
||||||
|
|||||||
@ -5,7 +5,8 @@
|
|||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"build": "ng build",
|
"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,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
import { Component, OnInit } from "@angular/core";
|
|
||||||
import { HttpClient } from "@angular/common/http";
|
import { HttpClient } from "@angular/common/http";
|
||||||
|
import { Component, OnInit } from "@angular/core";
|
||||||
import { lastValueFrom } from "rxjs";
|
import { lastValueFrom } from "rxjs";
|
||||||
|
|
||||||
import { TokenModel } from "openvidu-angular";
|
import { TokenModel } from "openvidu-angular";
|
||||||
|
import { environment } from 'src/environments/environment';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
@ -22,7 +23,7 @@ import { TokenModel } from "openvidu-angular";
|
|||||||
})
|
})
|
||||||
export class AppComponent implements OnInit {
|
export class AppComponent implements OnInit {
|
||||||
|
|
||||||
APPLICATION_SERVER_URL = 'http://localhost:5000/';
|
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||||
|
|
||||||
sessionId = 'participants-panel-directive-example';
|
sessionId = 'participants-panel-directive-example';
|
||||||
tokens!: TokenModel;
|
tokens!: TokenModel;
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true
|
production: true,
|
||||||
|
applicationServerUrl: '',
|
||||||
};
|
};
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
// The list of file replacements can be found in `angular.json`.
|
// The list of file replacements can be found in `angular.json`.
|
||||||
|
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: false
|
production: false,
|
||||||
|
applicationServerUrl: 'http://localhost:5000/',
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -66,7 +66,7 @@
|
|||||||
{
|
{
|
||||||
"type": "initial",
|
"type": "initial",
|
||||||
"maximumWarning": "500kb",
|
"maximumWarning": "500kb",
|
||||||
"maximumError": "1mb"
|
"maximumError": "5mb"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "anyComponentStyle",
|
"type": "anyComponentStyle",
|
||||||
|
|||||||
@ -5,7 +5,8 @@
|
|||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"build": "ng build",
|
"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,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { Component, OnInit } from "@angular/core";
|
|
||||||
import { HttpClient } from "@angular/common/http";
|
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";
|
import { ParticipantAbstractModel, ParticipantService, TokenModel } from "openvidu-angular";
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ import { ParticipantAbstractModel, ParticipantService, TokenModel } from "openvi
|
|||||||
})
|
})
|
||||||
export class AppComponent implements OnInit {
|
export class AppComponent implements OnInit {
|
||||||
|
|
||||||
APPLICATION_SERVER_URL = 'http://localhost:5000/';
|
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||||
|
|
||||||
sessionId = 'participants-panel-directive-example';
|
sessionId = 'participants-panel-directive-example';
|
||||||
tokens!: TokenModel;
|
tokens!: TokenModel;
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true
|
production: true,
|
||||||
|
applicationServerUrl: '',
|
||||||
};
|
};
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
// The list of file replacements can be found in `angular.json`.
|
// The list of file replacements can be found in `angular.json`.
|
||||||
|
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: false
|
production: false,
|
||||||
|
applicationServerUrl: 'http://localhost:5000/',
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -66,7 +66,7 @@
|
|||||||
{
|
{
|
||||||
"type": "initial",
|
"type": "initial",
|
||||||
"maximumWarning": "500kb",
|
"maximumWarning": "500kb",
|
||||||
"maximumError": "1mb"
|
"maximumError": "5mb"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "anyComponentStyle",
|
"type": "anyComponentStyle",
|
||||||
|
|||||||
@ -5,7 +5,8 @@
|
|||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"build": "ng build",
|
"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,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
import { HttpClient } from "@angular/common/http";
|
import { HttpClient } from "@angular/common/http";
|
||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { lastValueFrom } from "rxjs";
|
import { lastValueFrom } from "rxjs";
|
||||||
|
|
||||||
import { TokenModel } from 'openvidu-angular';
|
import { TokenModel } from 'openvidu-angular';
|
||||||
@ -25,7 +25,7 @@ import { TokenModel } from 'openvidu-angular';
|
|||||||
})
|
})
|
||||||
export class AppComponent implements OnInit {
|
export class AppComponent implements OnInit {
|
||||||
|
|
||||||
APPLICATION_SERVER_URL = 'http://localhost:5000/';
|
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||||
|
|
||||||
sessionId = 'toolbar-directive-example';
|
sessionId = 'toolbar-directive-example';
|
||||||
tokens!: TokenModel;
|
tokens!: TokenModel;
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true
|
production: true,
|
||||||
|
applicationServerUrl: '',
|
||||||
};
|
};
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
// The list of file replacements can be found in `angular.json`.
|
// The list of file replacements can be found in `angular.json`.
|
||||||
|
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: false
|
production: false,
|
||||||
|
applicationServerUrl: 'http://localhost:5000/',
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
{
|
{
|
||||||
"type": "initial",
|
"type": "initial",
|
||||||
"maximumWarning": "500kb",
|
"maximumWarning": "500kb",
|
||||||
"maximumError": "1mb"
|
"maximumError": "5mb"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "anyComponentStyle",
|
"type": "anyComponentStyle",
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"build": "ng build",
|
"build": "ng build",
|
||||||
"watch": "ng build --watch --configuration development",
|
"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,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component, OnInit } from "@angular/core";
|
|
||||||
import { HttpClient } from "@angular/common/http";
|
import { HttpClient } from "@angular/common/http";
|
||||||
|
import { Component, OnInit } from "@angular/core";
|
||||||
import { lastValueFrom } from "rxjs";
|
import { lastValueFrom } from "rxjs";
|
||||||
|
|
||||||
import { OpenViduService, TokenModel } from "openvidu-angular";
|
import { OpenViduService, TokenModel } from "openvidu-angular";
|
||||||
@ -17,7 +17,7 @@ import { OpenViduService, TokenModel } from "openvidu-angular";
|
|||||||
})
|
})
|
||||||
export class AppComponent implements OnInit {
|
export class AppComponent implements OnInit {
|
||||||
|
|
||||||
APPLICATION_SERVER_URL = 'http://localhost:5000/';
|
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||||
|
|
||||||
sessionId = 'toolbar-directive-example';
|
sessionId = 'toolbar-directive-example';
|
||||||
tokens!: TokenModel;
|
tokens!: TokenModel;
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true
|
production: true,
|
||||||
|
applicationServerUrl: '',
|
||||||
};
|
};
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
// The list of file replacements can be found in `angular.json`.
|
// The list of file replacements can be found in `angular.json`.
|
||||||
|
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: false
|
production: false,
|
||||||
|
applicationServerUrl: 'http://localhost:5000/',
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
{
|
{
|
||||||
"type": "initial",
|
"type": "initial",
|
||||||
"maximumWarning": "500kb",
|
"maximumWarning": "500kb",
|
||||||
"maximumError": "1mb"
|
"maximumError": "5mb"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "anyComponentStyle",
|
"type": "anyComponentStyle",
|
||||||
|
|||||||
@ -0,0 +1 @@
|
|||||||
|
docker/
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
SERVER_PORT=5000
|
||||||
|
OPENVIDU_URL=http://localhost:4443/
|
||||||
|
OPENVIDU_SECRET=MY_SECRET
|
||||||
129
openvidu-components/openvidu-custom-ui/openvidu-basic-node/.gitignore
vendored
Normal file
129
openvidu-components/openvidu-custom-ui/openvidu-basic-node/.gitignore
vendored
Normal file
@ -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.*
|
||||||
@ -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
|
||||||
|
```
|
||||||
@ -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" ]
|
||||||
@ -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" .
|
||||||
@ -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));
|
||||||
1273
openvidu-components/openvidu-custom-ui/openvidu-basic-node/package-lock.json
generated
Normal file
1273
openvidu-components/openvidu-custom-ui/openvidu-basic-node/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -6,7 +6,7 @@
|
|||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"build": "ng build",
|
"build": "ng build",
|
||||||
"watch": "ng build --watch --configuration development",
|
"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,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
import { Component } from "@angular/core";
|
|
||||||
import { HttpClient } from "@angular/common/http";
|
import { HttpClient } from "@angular/common/http";
|
||||||
|
import { Component } from "@angular/core";
|
||||||
import { lastValueFrom } from "rxjs";
|
import { lastValueFrom } from "rxjs";
|
||||||
|
|
||||||
import { TokenModel } from "openvidu-angular";
|
import { TokenModel } from "openvidu-angular";
|
||||||
|
import { environment } from 'src/environments/environment';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
@ -11,7 +12,7 @@ import { TokenModel } from "openvidu-angular";
|
|||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
|
|
||||||
APPLICATION_SERVER_URL = 'http://localhost:5000/';
|
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||||
|
|
||||||
sessionId = 'openvidu-custom-ui';
|
sessionId = 'openvidu-custom-ui';
|
||||||
tokens!: TokenModel;
|
tokens!: TokenModel;
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true
|
production: true,
|
||||||
|
applicationServerUrl: '',
|
||||||
};
|
};
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
// The list of file replacements can be found in `angular.json`.
|
// The list of file replacements can be found in `angular.json`.
|
||||||
|
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: false
|
production: false,
|
||||||
|
applicationServerUrl: 'http://localhost:5000/',
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -5,9 +5,7 @@
|
|||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve --configuration development",
|
"start": "ng serve --configuration development",
|
||||||
"build": "ng build",
|
"build": "ng build",
|
||||||
"test": "ng test",
|
"build:prod": "./node_modules/@angular/cli/bin/ng.js build --output-path ./openvidu-basic-node/public/ --configuration production"
|
||||||
"lint": "ng lint",
|
|
||||||
"e2e": "ng e2e"
|
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -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 { HttpClient } from "@angular/common/http";
|
||||||
import { trigger, transition, style, animate } from "@angular/animations";
|
import { Component, OnInit } from "@angular/core";
|
||||||
import { lastValueFrom } from "rxjs";
|
import { lastValueFrom } from "rxjs";
|
||||||
|
|
||||||
import { ParticipantService, OpenViduService } from "openvidu-angular";
|
import { OpenViduService, ParticipantService } from "openvidu-angular";
|
||||||
import { ParticipantAppModel } from "./models/participant-app.model";
|
import { ParticipantAppModel } from "./models/participant-app.model";
|
||||||
|
|
||||||
import { Session, SignalOptions } from "openvidu-browser";
|
import { Session, SignalOptions } from "openvidu-browser";
|
||||||
|
import { environment } from 'src/environments/environment';
|
||||||
|
|
||||||
enum SignalApp {
|
enum SignalApp {
|
||||||
HAND_TOGGLE = 'handToggle'
|
HAND_TOGGLE = 'handToggle'
|
||||||
@ -31,7 +32,7 @@ enum SignalApp {
|
|||||||
})
|
})
|
||||||
export class AppComponent implements OnInit {
|
export class AppComponent implements OnInit {
|
||||||
|
|
||||||
APPLICATION_SERVER_URL = 'http://localhost:5000/';
|
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||||
|
|
||||||
tokens: { webcam: string; screen: string };
|
tokens: { webcam: string; screen: string };
|
||||||
hasHandRaised: boolean = false;
|
hasHandRaised: boolean = false;
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true
|
production: true,
|
||||||
|
applicationServerUrl: '',
|
||||||
};
|
};
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
// The list of file replacements can be found in `angular.json`.
|
// The list of file replacements can be found in `angular.json`.
|
||||||
|
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: false
|
production: false,
|
||||||
|
applicationServerUrl: 'http://localhost:5000/',
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -66,7 +66,7 @@
|
|||||||
{
|
{
|
||||||
"type": "initial",
|
"type": "initial",
|
||||||
"maximumWarning": "500kb",
|
"maximumWarning": "500kb",
|
||||||
"maximumError": "1mb"
|
"maximumError": "5mb"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "anyComponentStyle",
|
"type": "anyComponentStyle",
|
||||||
|
|||||||
@ -5,7 +5,8 @@
|
|||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"build": "ng build",
|
"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,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
import { Component, OnInit } from "@angular/core";
|
|
||||||
import { HttpClient } from "@angular/common/http";
|
import { HttpClient } from "@angular/common/http";
|
||||||
|
import { Component, OnInit } from "@angular/core";
|
||||||
import { lastValueFrom } from "rxjs";
|
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({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
@ -22,7 +23,7 @@ import { TokenModel, OpenViduService, ParticipantService } from "openvidu-angula
|
|||||||
})
|
})
|
||||||
export class AppComponent implements OnInit {
|
export class AppComponent implements OnInit {
|
||||||
|
|
||||||
APPLICATION_SERVER_URL = 'http://localhost:5000/';
|
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||||
|
|
||||||
sessionId = 'toolbar-additionalbtn-directive-example';
|
sessionId = 'toolbar-additionalbtn-directive-example';
|
||||||
tokens!: TokenModel;
|
tokens!: TokenModel;
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true
|
production: true,
|
||||||
|
applicationServerUrl: '',
|
||||||
};
|
};
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
// The list of file replacements can be found in `angular.json`.
|
// The list of file replacements can be found in `angular.json`.
|
||||||
|
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: false
|
production: false,
|
||||||
|
applicationServerUrl: 'http://localhost:5000/',
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -66,7 +66,7 @@
|
|||||||
{
|
{
|
||||||
"type": "initial",
|
"type": "initial",
|
||||||
"maximumWarning": "500kb",
|
"maximumWarning": "500kb",
|
||||||
"maximumError": "1mb"
|
"maximumError": "5mb"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "anyComponentStyle",
|
"type": "anyComponentStyle",
|
||||||
|
|||||||
@ -5,7 +5,8 @@
|
|||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"build": "ng build",
|
"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,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
import { Component, OnInit } from "@angular/core";
|
|
||||||
import { HttpClient } from "@angular/common/http";
|
import { HttpClient } from "@angular/common/http";
|
||||||
|
import { Component, OnInit } from "@angular/core";
|
||||||
import { lastValueFrom } from "rxjs";
|
import { lastValueFrom } from "rxjs";
|
||||||
|
|
||||||
import { TokenModel } from "openvidu-angular";
|
import { TokenModel } from "openvidu-angular";
|
||||||
|
import { environment } from 'src/environments/environment';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-root",
|
selector: "app-root",
|
||||||
@ -17,7 +18,7 @@ import { TokenModel } from "openvidu-angular";
|
|||||||
})
|
})
|
||||||
export class AppComponent implements OnInit {
|
export class AppComponent implements OnInit {
|
||||||
|
|
||||||
APPLICATION_SERVER_URL = 'http://localhost:5000/';
|
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||||
|
|
||||||
sessionId = "toolbar-additionalPanelbtn";
|
sessionId = "toolbar-additionalPanelbtn";
|
||||||
tokens!: TokenModel;
|
tokens!: TokenModel;
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true
|
production: true,
|
||||||
|
applicationServerUrl: '',
|
||||||
};
|
};
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
// The list of file replacements can be found in `angular.json`.
|
// The list of file replacements can be found in `angular.json`.
|
||||||
|
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: false
|
production: false,
|
||||||
|
applicationServerUrl: 'http://localhost:5000/',
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user