diff --git a/openvidu-basic-node/.env b/openvidu-basic-node/.env
index 76dfb4e8..91f89392 100644
--- a/openvidu-basic-node/.env
+++ b/openvidu-basic-node/.env
@@ -1,3 +1,3 @@
SERVER_PORT=5000
-OPENVIDU_URL=http://localhost:4443/
+OPENVIDU_URL='https://openvidu-ce-2250.openvidu.io'
OPENVIDU_SECRET=MY_SECRET
\ No newline at end of file
diff --git a/openvidu-filters/docker/entrypoint.sh b/openvidu-filters/docker/entrypoint.sh
index c74cae5e..aba13997 100755
--- a/openvidu-filters/docker/entrypoint.sh
+++ b/openvidu-filters/docker/entrypoint.sh
@@ -5,12 +5,9 @@ if [ -n "${OPENVIDU_APPLICATION_SERVER_URL}" ]; then
sed -i \
"s|var APPLICATION_SERVER_URL = \"http://localhost:5000/\";|var APPLICATION_SERVER_URL = \"${OPENVIDU_APPLICATION_SERVER_URL}/\";|" \
public/app.js
-fi
-
-if [ -n "${SERVER_PORT}" ]; then
- # Replace SERVER_PORT at frontend app
+else
sed -i \
- "s|var APPLICATION_SERVER_URL = \"http://localhost:5000/\";|var APPLICATION_SERVER_URL = \"http://localhost:${SERVER_PORT}/\";|" \
+ "s|var APPLICATION_SERVER_URL = \"http://localhost:5000/\";|var APPLICATION_SERVER_URL = \"\";|" \
public/app.js
fi
diff --git a/openvidu-getaroom/docker/entrypoint.sh b/openvidu-getaroom/docker/entrypoint.sh
index ed2d8bce..eacde4aa 100755
--- a/openvidu-getaroom/docker/entrypoint.sh
+++ b/openvidu-getaroom/docker/entrypoint.sh
@@ -5,12 +5,9 @@ if [ -n "${OPENVIDU_APPLICATION_SERVER_URL}" ]; then
sed -i \
"s|var APPLICATION_SERVER_URL = \"http://localhost:5000/\";|var APPLICATION_SERVER_URL = \"${OPENVIDU_APPLICATION_SERVER_URL}/\";|" \
public/app.js
-fi
-
-if [ -n "${SERVER_PORT}" ]; then
- # Replace SERVER_PORT at frontend app
+else
sed -i \
- "s|var APPLICATION_SERVER_URL = \"http://localhost:5000/\";|var APPLICATION_SERVER_URL = \"http://localhost:${SERVER_PORT}/\";|" \
+ "s|var APPLICATION_SERVER_URL = \"http://localhost:5000/\";|var APPLICATION_SERVER_URL = \"\";|" \
public/app.js
fi
diff --git a/openvidu-hello-world/docker/entrypoint.sh b/openvidu-hello-world/docker/entrypoint.sh
index 5f7fb888..1e66a6b3 100755
--- a/openvidu-hello-world/docker/entrypoint.sh
+++ b/openvidu-hello-world/docker/entrypoint.sh
@@ -5,12 +5,9 @@ if [ -n "${OPENVIDU_APPLICATION_SERVER_URL}" ]; then
sed -i \
"s|APPLICATION_SERVER_URL = \"http://localhost:5000/\";|APPLICATION_SERVER_URL = \"${OPENVIDU_APPLICATION_SERVER_URL}/\";|" \
public/app.js
-fi
-
-if [ -n "${SERVER_PORT}" ]; then
- # Replace SERVER_PORT at frontend app
+else
sed -i \
- "s|var APPLICATION_SERVER_URL = \"http://localhost:5000/\";|var APPLICATION_SERVER_URL = \"http://localhost:${SERVER_PORT}/\";|" \
+ "s|var APPLICATION_SERVER_URL = \"http://localhost:5000/\";|var APPLICATION_SERVER_URL = \"\";|" \
public/app.js
fi
diff --git a/openvidu-js-screen-share/docker/entrypoint.sh b/openvidu-js-screen-share/docker/entrypoint.sh
index c74cae5e..aba13997 100755
--- a/openvidu-js-screen-share/docker/entrypoint.sh
+++ b/openvidu-js-screen-share/docker/entrypoint.sh
@@ -5,12 +5,9 @@ if [ -n "${OPENVIDU_APPLICATION_SERVER_URL}" ]; then
sed -i \
"s|var APPLICATION_SERVER_URL = \"http://localhost:5000/\";|var APPLICATION_SERVER_URL = \"${OPENVIDU_APPLICATION_SERVER_URL}/\";|" \
public/app.js
-fi
-
-if [ -n "${SERVER_PORT}" ]; then
- # Replace SERVER_PORT at frontend app
+else
sed -i \
- "s|var APPLICATION_SERVER_URL = \"http://localhost:5000/\";|var APPLICATION_SERVER_URL = \"http://localhost:${SERVER_PORT}/\";|" \
+ "s|var APPLICATION_SERVER_URL = \"http://localhost:5000/\";|var APPLICATION_SERVER_URL = \"\";|" \
public/app.js
fi
diff --git a/openvidu-js/docker/entrypoint.sh b/openvidu-js/docker/entrypoint.sh
index c74cae5e..aba13997 100755
--- a/openvidu-js/docker/entrypoint.sh
+++ b/openvidu-js/docker/entrypoint.sh
@@ -5,12 +5,9 @@ if [ -n "${OPENVIDU_APPLICATION_SERVER_URL}" ]; then
sed -i \
"s|var APPLICATION_SERVER_URL = \"http://localhost:5000/\";|var APPLICATION_SERVER_URL = \"${OPENVIDU_APPLICATION_SERVER_URL}/\";|" \
public/app.js
-fi
-
-if [ -n "${SERVER_PORT}" ]; then
- # Replace SERVER_PORT at frontend app
+else
sed -i \
- "s|var APPLICATION_SERVER_URL = \"http://localhost:5000/\";|var APPLICATION_SERVER_URL = \"http://localhost:${SERVER_PORT}/\";|" \
+ "s|var APPLICATION_SERVER_URL = \"http://localhost:5000/\";|var APPLICATION_SERVER_URL = \"\";|" \
public/app.js
fi
diff --git a/openvidu-js/web/app.js b/openvidu-js/web/app.js
index 810e961f..094fd5bf 100644
--- a/openvidu-js/web/app.js
+++ b/openvidu-js/web/app.js
@@ -182,17 +182,17 @@ function initMainVideo(videoElement, userData) {
* --------------------------------------------
* 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.
*/
-var APPLICATION_SERVER_URL = "http://localhost:5000/";
+var APPLICATION_SERVER_URL = "https://openvidu-ce-2250.openvidu.io/";
function getToken(mySessionId) {
return createSession(mySessionId).then(sessionId => createToken(sessionId));
diff --git a/openvidu-react/src/App.js b/openvidu-react/src/App.js
index bf214461..b7259f17 100644
--- a/openvidu-react/src/App.js
+++ b/openvidu-react/src/App.js
@@ -5,7 +5,7 @@ import React, { Component } from 'react';
import './App.css';
import UserVideoComponent from './UserVideoComponent';
-const APPLICATION_SERVER_URL = process.env.NODE_ENV === 'production' ? '' : 'http://localhost:5000/';
+const APPLICATION_SERVER_URL = process.env.NODE_ENV === 'production' ? '' : 'https://demos.openvidu.io/';
class App extends Component {
constructor(props) {
@@ -276,18 +276,19 @@ class App extends Component {
onClick={this.leaveSession}
value="Leave session"
/>
+
{this.state.mainStreamManager !== undefined ? (
@@ -298,7 +299,8 @@ class App extends Component {
) : null}
{this.state.subscribers.map((sub, i) => (
- this.handleMainVideoStream(sub)}>
+
this.handleMainVideoStream(sub)}>
+ {sub.id}
))}
diff --git a/openvidu-react/src/index.css b/openvidu-react/src/index.css
index eecbf752..58eeb6b3 100644
--- a/openvidu-react/src/index.css
+++ b/openvidu-react/src/index.css
@@ -159,14 +159,10 @@ a:hover .demo-logo {
display: inline-block;
}
-#buttonLeaveSession {
+#buttonLeaveSession, #buttonSwitchCamera {
float: right;
margin-top: 20px;
}
-#buttonSwitchCamera {
- float: left;
- margin-top: 20px;
-}
#video-container video {
position: relative;
diff --git a/openvidu-speech-to-text/docker/entrypoint.sh b/openvidu-speech-to-text/docker/entrypoint.sh
index c74cae5e..aba13997 100755
--- a/openvidu-speech-to-text/docker/entrypoint.sh
+++ b/openvidu-speech-to-text/docker/entrypoint.sh
@@ -5,12 +5,9 @@ if [ -n "${OPENVIDU_APPLICATION_SERVER_URL}" ]; then
sed -i \
"s|var APPLICATION_SERVER_URL = \"http://localhost:5000/\";|var APPLICATION_SERVER_URL = \"${OPENVIDU_APPLICATION_SERVER_URL}/\";|" \
public/app.js
-fi
-
-if [ -n "${SERVER_PORT}" ]; then
- # Replace SERVER_PORT at frontend app
+else
sed -i \
- "s|var APPLICATION_SERVER_URL = \"http://localhost:5000/\";|var APPLICATION_SERVER_URL = \"http://localhost:${SERVER_PORT}/\";|" \
+ "s|var APPLICATION_SERVER_URL = \"http://localhost:5000/\";|var APPLICATION_SERVER_URL = \"\";|" \
public/app.js
fi
diff --git a/openvidu-streaming/.browserslistrc b/openvidu-streaming/.browserslistrc
new file mode 100644
index 00000000..4f9ac269
--- /dev/null
+++ b/openvidu-streaming/.browserslistrc
@@ -0,0 +1,16 @@
+# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
+# For additional information regarding the format and rule options, please see:
+# https://github.com/browserslist/browserslist#queries
+
+# For the full list of supported browsers by the Angular framework, please see:
+# https://angular.io/guide/browser-support
+
+# You can see what browsers were selected by your queries by running:
+# npx browserslist
+
+last 1 Chrome version
+last 1 Firefox version
+last 2 Edge major versions
+last 2 Safari major versions
+last 2 iOS major versions
+Firefox ESR
diff --git a/openvidu-streaming/.editorconfig b/openvidu-streaming/.editorconfig
new file mode 100644
index 00000000..59d9a3a3
--- /dev/null
+++ b/openvidu-streaming/.editorconfig
@@ -0,0 +1,16 @@
+# Editor configuration, see https://editorconfig.org
+root = true
+
+[*]
+charset = utf-8
+indent_style = space
+indent_size = 2
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.ts]
+quote_type = single
+
+[*.md]
+max_line_length = off
+trim_trailing_whitespace = false
diff --git a/openvidu-streaming/.gitignore b/openvidu-streaming/.gitignore
new file mode 100644
index 00000000..0711527e
--- /dev/null
+++ b/openvidu-streaming/.gitignore
@@ -0,0 +1,42 @@
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+
+# Compiled output
+/dist
+/tmp
+/out-tsc
+/bazel-out
+
+# Node
+/node_modules
+npm-debug.log
+yarn-error.log
+
+# IDEs and editors
+.idea/
+.project
+.classpath
+.c9/
+*.launch
+.settings/
+*.sublime-workspace
+
+# Visual Studio Code
+.vscode/*
+!.vscode/settings.json
+!.vscode/tasks.json
+!.vscode/launch.json
+!.vscode/extensions.json
+.history/*
+
+# Miscellaneous
+/.angular/cache
+.sass-cache/
+/connect.lock
+/coverage
+/libpeerconnection.log
+testem.log
+/typings
+
+# System files
+.DS_Store
+Thumbs.db
diff --git a/openvidu-streaming/.vscode/extensions.json b/openvidu-streaming/.vscode/extensions.json
new file mode 100644
index 00000000..77b37457
--- /dev/null
+++ b/openvidu-streaming/.vscode/extensions.json
@@ -0,0 +1,4 @@
+{
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
+ "recommendations": ["angular.ng-template"]
+}
diff --git a/openvidu-streaming/.vscode/launch.json b/openvidu-streaming/.vscode/launch.json
new file mode 100644
index 00000000..740e35a0
--- /dev/null
+++ b/openvidu-streaming/.vscode/launch.json
@@ -0,0 +1,20 @@
+{
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "ng serve",
+ "type": "pwa-chrome",
+ "request": "launch",
+ "preLaunchTask": "npm: start",
+ "url": "http://localhost:4200/"
+ },
+ {
+ "name": "ng test",
+ "type": "chrome",
+ "request": "launch",
+ "preLaunchTask": "npm: test",
+ "url": "http://localhost:9876/debug.html"
+ }
+ ]
+}
diff --git a/openvidu-streaming/.vscode/tasks.json b/openvidu-streaming/.vscode/tasks.json
new file mode 100644
index 00000000..a298b5bd
--- /dev/null
+++ b/openvidu-streaming/.vscode/tasks.json
@@ -0,0 +1,42 @@
+{
+ // For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "type": "npm",
+ "script": "start",
+ "isBackground": true,
+ "problemMatcher": {
+ "owner": "typescript",
+ "pattern": "$tsc",
+ "background": {
+ "activeOnStart": true,
+ "beginsPattern": {
+ "regexp": "(.*?)"
+ },
+ "endsPattern": {
+ "regexp": "bundle generation complete"
+ }
+ }
+ }
+ },
+ {
+ "type": "npm",
+ "script": "test",
+ "isBackground": true,
+ "problemMatcher": {
+ "owner": "typescript",
+ "pattern": "$tsc",
+ "background": {
+ "activeOnStart": true,
+ "beginsPattern": {
+ "regexp": "(.*?)"
+ },
+ "endsPattern": {
+ "regexp": "bundle generation complete"
+ }
+ }
+ }
+ }
+ ]
+}
diff --git a/openvidu-streaming/README.md b/openvidu-streaming/README.md
new file mode 100644
index 00000000..2c2944b5
--- /dev/null
+++ b/openvidu-streaming/README.md
@@ -0,0 +1,27 @@
+# OpenviduStreaming
+
+This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.2.2.
+
+## Development server
+
+Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
+
+## Code scaffolding
+
+Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
+
+## Build
+
+Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
+
+## Running unit tests
+
+Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
+
+## Running end-to-end tests
+
+Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
+
+## Further help
+
+To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
diff --git a/openvidu-streaming/angular.json b/openvidu-streaming/angular.json
new file mode 100644
index 00000000..a2d2bff9
--- /dev/null
+++ b/openvidu-streaming/angular.json
@@ -0,0 +1,107 @@
+{
+ "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
+ "version": 1,
+ "newProjectRoot": "projects",
+ "projects": {
+ "openvidu-streaming": {
+ "projectType": "application",
+ "schematics": {
+ "@schematics/angular:component": {
+ "style": "scss"
+ }
+ },
+ "root": "",
+ "sourceRoot": "src",
+ "prefix": "app",
+ "architect": {
+ "build": {
+ "builder": "@angular-devkit/build-angular:browser",
+ "options": {
+ "outputPath": "dist/openvidu-streaming",
+ "index": "src/index.html",
+ "main": "src/main.ts",
+ "polyfills": "src/polyfills.ts",
+ "tsConfig": "tsconfig.app.json",
+ "inlineStyleLanguage": "scss",
+ "assets": [
+ "src/favicon.ico",
+ "src/assets"
+ ],
+ "styles": [
+ "src/styles.scss"
+ ],
+ "scripts": []
+ },
+ "configurations": {
+ "production": {
+ "budgets": [
+ {
+ "type": "initial",
+ "maximumWarning": "500kb",
+ "maximumError": "5mb"
+ },
+ {
+ "type": "anyComponentStyle",
+ "maximumWarning": "2kb",
+ "maximumError": "4kb"
+ }
+ ],
+ "fileReplacements": [
+ {
+ "replace": "src/environments/environment.ts",
+ "with": "src/environments/environment.prod.ts"
+ }
+ ],
+ "outputHashing": "all"
+ },
+ "development": {
+ "buildOptimizer": false,
+ "optimization": false,
+ "vendorChunk": true,
+ "extractLicenses": false,
+ "sourceMap": true,
+ "namedChunks": true
+ }
+ },
+ "defaultConfiguration": "production"
+ },
+ "serve": {
+ "builder": "@angular-devkit/build-angular:dev-server",
+ "configurations": {
+ "production": {
+ "browserTarget": "openvidu-streaming:build:production"
+ },
+ "development": {
+ "browserTarget": "openvidu-streaming:build:development"
+ }
+ },
+ "defaultConfiguration": "development"
+ },
+ "extract-i18n": {
+ "builder": "@angular-devkit/build-angular:extract-i18n",
+ "options": {
+ "browserTarget": "openvidu-streaming:build"
+ }
+ },
+ "test": {
+ "builder": "@angular-devkit/build-angular:karma",
+ "options": {
+ "main": "src/test.ts",
+ "polyfills": "src/polyfills.ts",
+ "tsConfig": "tsconfig.spec.json",
+ "karmaConfig": "karma.conf.js",
+ "inlineStyleLanguage": "scss",
+ "assets": [
+ "src/favicon.ico",
+ "src/assets"
+ ],
+ "styles": [
+ "src/styles.scss"
+ ],
+ "scripts": []
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/openvidu-streaming/karma.conf.js b/openvidu-streaming/karma.conf.js
new file mode 100644
index 00000000..ef8280a8
--- /dev/null
+++ b/openvidu-streaming/karma.conf.js
@@ -0,0 +1,44 @@
+// Karma configuration file, see link for more information
+// https://karma-runner.github.io/1.0/config/configuration-file.html
+
+module.exports = function (config) {
+ config.set({
+ basePath: '',
+ frameworks: ['jasmine', '@angular-devkit/build-angular'],
+ plugins: [
+ require('karma-jasmine'),
+ require('karma-chrome-launcher'),
+ require('karma-jasmine-html-reporter'),
+ require('karma-coverage'),
+ require('@angular-devkit/build-angular/plugins/karma')
+ ],
+ client: {
+ jasmine: {
+ // you can add configuration options for Jasmine here
+ // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
+ // for example, you can disable the random execution with `random: false`
+ // or set a specific seed with `seed: 4321`
+ },
+ clearContext: false // leave Jasmine Spec Runner output visible in browser
+ },
+ jasmineHtmlReporter: {
+ suppressAll: true // removes the duplicated traces
+ },
+ coverageReporter: {
+ dir: require('path').join(__dirname, './coverage/openvidu-streaming'),
+ subdir: '.',
+ reporters: [
+ { type: 'html' },
+ { type: 'text-summary' }
+ ]
+ },
+ reporters: ['progress', 'kjhtml'],
+ port: 9876,
+ colors: true,
+ logLevel: config.LOG_INFO,
+ autoWatch: true,
+ browsers: ['Chrome'],
+ singleRun: false,
+ restartOnFileChange: true
+ });
+};
diff --git a/openvidu-streaming/package.json b/openvidu-streaming/package.json
new file mode 100644
index 00000000..ec8d5d7e
--- /dev/null
+++ b/openvidu-streaming/package.json
@@ -0,0 +1,38 @@
+{
+ "name": "openvidu-streaming",
+ "version": "0.0.0",
+ "scripts": {
+ "ng": "ng",
+ "start": "ng serve",
+ "build": "ng build",
+ "watch": "ng build --watch --configuration development",
+ "test": "ng test"
+ },
+ "private": true,
+ "dependencies": {
+ "@angular/animations": "^14.2.0",
+ "@angular/common": "^14.2.0",
+ "@angular/compiler": "^14.2.0",
+ "@angular/core": "^14.2.0",
+ "@angular/forms": "^14.2.0",
+ "@angular/platform-browser": "^14.2.0",
+ "@angular/platform-browser-dynamic": "^14.2.0",
+ "@angular/router": "^14.2.0",
+ "rxjs": "~7.5.0",
+ "tslib": "^2.3.0",
+ "zone.js": "~0.11.4"
+ },
+ "devDependencies": {
+ "@angular-devkit/build-angular": "^14.2.2",
+ "@angular/cli": "~14.2.2",
+ "@angular/compiler-cli": "^14.2.0",
+ "@types/jasmine": "~4.0.0",
+ "jasmine-core": "~4.3.0",
+ "karma": "~6.4.0",
+ "karma-chrome-launcher": "~3.1.0",
+ "karma-coverage": "~2.2.0",
+ "karma-jasmine": "~5.1.0",
+ "karma-jasmine-html-reporter": "~2.0.0",
+ "typescript": "~4.7.2"
+ }
+}
diff --git a/openvidu-streaming/src/app/app.component.html b/openvidu-streaming/src/app/app.component.html
new file mode 100644
index 00000000..e4e763e7
--- /dev/null
+++ b/openvidu-streaming/src/app/app.component.html
@@ -0,0 +1,483 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ title }} app is running!
+
+
+
+
+
+
+
Resources
+
Here are some links to help you get started:
+
+
+
+
+
Next Steps
+
What do you want to do next with your app?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ng generate component xyz
+
ng add @angular/material
+
ng add @angular/pwa
+
ng add _____
+
ng test
+
ng build
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/openvidu-streaming/src/app/app.component.scss b/openvidu-streaming/src/app/app.component.scss
new file mode 100644
index 00000000..e69de29b
diff --git a/openvidu-streaming/src/app/app.component.spec.ts b/openvidu-streaming/src/app/app.component.spec.ts
new file mode 100644
index 00000000..39c299a0
--- /dev/null
+++ b/openvidu-streaming/src/app/app.component.spec.ts
@@ -0,0 +1,31 @@
+import { TestBed } from '@angular/core/testing';
+import { AppComponent } from './app.component';
+
+describe('AppComponent', () => {
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [
+ AppComponent
+ ],
+ }).compileComponents();
+ });
+
+ it('should create the app', () => {
+ const fixture = TestBed.createComponent(AppComponent);
+ const app = fixture.componentInstance;
+ expect(app).toBeTruthy();
+ });
+
+ it(`should have as title 'openvidu-streaming'`, () => {
+ const fixture = TestBed.createComponent(AppComponent);
+ const app = fixture.componentInstance;
+ expect(app.title).toEqual('openvidu-streaming');
+ });
+
+ it('should render title', () => {
+ const fixture = TestBed.createComponent(AppComponent);
+ fixture.detectChanges();
+ const compiled = fixture.nativeElement as HTMLElement;
+ expect(compiled.querySelector('.content span')?.textContent).toContain('openvidu-streaming app is running!');
+ });
+});
diff --git a/openvidu-streaming/src/app/app.component.ts b/openvidu-streaming/src/app/app.component.ts
new file mode 100644
index 00000000..540deb26
--- /dev/null
+++ b/openvidu-streaming/src/app/app.component.ts
@@ -0,0 +1,10 @@
+import { Component } from '@angular/core';
+
+@Component({
+ selector: 'app-root',
+ templateUrl: './app.component.html',
+ styleUrls: ['./app.component.scss']
+})
+export class AppComponent {
+ title = 'openvidu-streaming';
+}
diff --git a/openvidu-streaming/src/app/app.module.ts b/openvidu-streaming/src/app/app.module.ts
new file mode 100644
index 00000000..8dfc1d68
--- /dev/null
+++ b/openvidu-streaming/src/app/app.module.ts
@@ -0,0 +1,16 @@
+import { NgModule } from '@angular/core';
+import { BrowserModule } from '@angular/platform-browser';
+
+import { AppComponent } from './app.component';
+
+@NgModule({
+ declarations: [
+ AppComponent
+ ],
+ imports: [
+ BrowserModule
+ ],
+ providers: [],
+ bootstrap: [AppComponent]
+})
+export class AppModule { }
diff --git a/openvidu-streaming/src/assets/.gitkeep b/openvidu-streaming/src/assets/.gitkeep
new file mode 100644
index 00000000..e69de29b
diff --git a/openvidu-streaming/src/environments/environment.prod.ts b/openvidu-streaming/src/environments/environment.prod.ts
new file mode 100644
index 00000000..9a519d17
--- /dev/null
+++ b/openvidu-streaming/src/environments/environment.prod.ts
@@ -0,0 +1,4 @@
+export const environment = {
+ production: true,
+ applicationServerUrl: '',
+};
diff --git a/openvidu-streaming/src/environments/environment.ts b/openvidu-streaming/src/environments/environment.ts
new file mode 100644
index 00000000..f56ff470
--- /dev/null
+++ b/openvidu-streaming/src/environments/environment.ts
@@ -0,0 +1,16 @@
+// This file can be replaced during build by using the `fileReplacements` array.
+// `ng build` replaces `environment.ts` with `environment.prod.ts`.
+// The list of file replacements can be found in `angular.json`.
+
+export const environment = {
+ production: false
+};
+
+/*
+ * For easier debugging in development mode, you can import the following file
+ * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
+ *
+ * This import should be commented out in production mode because it will have a negative impact
+ * on performance if an error is thrown.
+ */
+// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
diff --git a/openvidu-streaming/src/favicon.ico b/openvidu-streaming/src/favicon.ico
new file mode 100644
index 00000000..997406ad
Binary files /dev/null and b/openvidu-streaming/src/favicon.ico differ
diff --git a/openvidu-streaming/src/index.html b/openvidu-streaming/src/index.html
new file mode 100644
index 00000000..fbab4d34
--- /dev/null
+++ b/openvidu-streaming/src/index.html
@@ -0,0 +1,13 @@
+
+
+
+
+
OpenviduStreaming
+
+
+
+
+
+
+
+
diff --git a/openvidu-streaming/src/main.ts b/openvidu-streaming/src/main.ts
new file mode 100644
index 00000000..c7b673cf
--- /dev/null
+++ b/openvidu-streaming/src/main.ts
@@ -0,0 +1,12 @@
+import { enableProdMode } from '@angular/core';
+import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
+
+import { AppModule } from './app/app.module';
+import { environment } from './environments/environment';
+
+if (environment.production) {
+ enableProdMode();
+}
+
+platformBrowserDynamic().bootstrapModule(AppModule)
+ .catch(err => console.error(err));
diff --git a/openvidu-streaming/src/polyfills.ts b/openvidu-streaming/src/polyfills.ts
new file mode 100644
index 00000000..429bb9ef
--- /dev/null
+++ b/openvidu-streaming/src/polyfills.ts
@@ -0,0 +1,53 @@
+/**
+ * This file includes polyfills needed by Angular and is loaded before the app.
+ * You can add your own extra polyfills to this file.
+ *
+ * This file is divided into 2 sections:
+ * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
+ * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
+ * file.
+ *
+ * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
+ * automatically update themselves. This includes recent versions of Safari, Chrome (including
+ * Opera), Edge on the desktop, and iOS and Chrome on mobile.
+ *
+ * Learn more in https://angular.io/guide/browser-support
+ */
+
+/***************************************************************************************************
+ * BROWSER POLYFILLS
+ */
+
+/**
+ * By default, zone.js will patch all possible macroTask and DomEvents
+ * user can disable parts of macroTask/DomEvents patch by setting following flags
+ * because those flags need to be set before `zone.js` being loaded, and webpack
+ * will put import in the top of bundle, so user need to create a separate file
+ * in this directory (for example: zone-flags.ts), and put the following flags
+ * into that file, and then add the following code before importing zone.js.
+ * import './zone-flags';
+ *
+ * The flags allowed in zone-flags.ts are listed here.
+ *
+ * The following flags will work for all browsers.
+ *
+ * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
+ * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
+ * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
+ *
+ * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
+ * with the following flag, it will bypass `zone.js` patch for IE/Edge
+ *
+ * (window as any).__Zone_enable_cross_context_check = true;
+ *
+ */
+
+/***************************************************************************************************
+ * Zone JS is required by default for Angular itself.
+ */
+import 'zone.js'; // Included with Angular CLI.
+
+
+/***************************************************************************************************
+ * APPLICATION IMPORTS
+ */
diff --git a/openvidu-streaming/src/styles.scss b/openvidu-streaming/src/styles.scss
new file mode 100644
index 00000000..90d4ee00
--- /dev/null
+++ b/openvidu-streaming/src/styles.scss
@@ -0,0 +1 @@
+/* You can add global styles to this file, and also import other style files */
diff --git a/openvidu-streaming/src/test.ts b/openvidu-streaming/src/test.ts
new file mode 100644
index 00000000..c04c8760
--- /dev/null
+++ b/openvidu-streaming/src/test.ts
@@ -0,0 +1,26 @@
+// This file is required by karma.conf.js and loads recursively all the .spec and framework files
+
+import 'zone.js/testing';
+import { getTestBed } from '@angular/core/testing';
+import {
+ BrowserDynamicTestingModule,
+ platformBrowserDynamicTesting
+} from '@angular/platform-browser-dynamic/testing';
+
+declare const require: {
+ context(path: string, deep?: boolean, filter?: RegExp): {
+
(id: string): T;
+ keys(): string[];
+ };
+};
+
+// First, initialize the Angular testing environment.
+getTestBed().initTestEnvironment(
+ BrowserDynamicTestingModule,
+ platformBrowserDynamicTesting(),
+);
+
+// Then we find all the tests.
+const context = require.context('./', true, /\.spec\.ts$/);
+// And load the modules.
+context.keys().forEach(context);
diff --git a/openvidu-streaming/tsconfig.app.json b/openvidu-streaming/tsconfig.app.json
new file mode 100644
index 00000000..82d91dc4
--- /dev/null
+++ b/openvidu-streaming/tsconfig.app.json
@@ -0,0 +1,15 @@
+/* To learn more about this file see: https://angular.io/config/tsconfig. */
+{
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "outDir": "./out-tsc/app",
+ "types": []
+ },
+ "files": [
+ "src/main.ts",
+ "src/polyfills.ts"
+ ],
+ "include": [
+ "src/**/*.d.ts"
+ ]
+}
diff --git a/openvidu-streaming/tsconfig.json b/openvidu-streaming/tsconfig.json
new file mode 100644
index 00000000..ff06eae1
--- /dev/null
+++ b/openvidu-streaming/tsconfig.json
@@ -0,0 +1,32 @@
+/* To learn more about this file see: https://angular.io/config/tsconfig. */
+{
+ "compileOnSave": false,
+ "compilerOptions": {
+ "baseUrl": "./",
+ "outDir": "./dist/out-tsc",
+ "forceConsistentCasingInFileNames": true,
+ "strict": true,
+ "noImplicitOverride": true,
+ "noPropertyAccessFromIndexSignature": true,
+ "noImplicitReturns": true,
+ "noFallthroughCasesInSwitch": true,
+ "sourceMap": true,
+ "declaration": false,
+ "downlevelIteration": true,
+ "experimentalDecorators": true,
+ "moduleResolution": "node",
+ "importHelpers": true,
+ "target": "es2020",
+ "module": "es2020",
+ "lib": [
+ "es2020",
+ "dom"
+ ]
+ },
+ "angularCompilerOptions": {
+ "enableI18nLegacyMessageIdFormat": false,
+ "strictInjectionParameters": true,
+ "strictInputAccessModifiers": true,
+ "strictTemplates": true
+ }
+}
diff --git a/openvidu-streaming/tsconfig.spec.json b/openvidu-streaming/tsconfig.spec.json
new file mode 100644
index 00000000..092345b0
--- /dev/null
+++ b/openvidu-streaming/tsconfig.spec.json
@@ -0,0 +1,18 @@
+/* To learn more about this file see: https://angular.io/config/tsconfig. */
+{
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "outDir": "./out-tsc/spec",
+ "types": [
+ "jasmine"
+ ]
+ },
+ "files": [
+ "src/test.ts",
+ "src/polyfills.ts"
+ ],
+ "include": [
+ "src/**/*.spec.ts",
+ "src/**/*.d.ts"
+ ]
+}
diff --git a/openvidu-virtual-background/docker/entrypoint.sh b/openvidu-virtual-background/docker/entrypoint.sh
index c74cae5e..aba13997 100755
--- a/openvidu-virtual-background/docker/entrypoint.sh
+++ b/openvidu-virtual-background/docker/entrypoint.sh
@@ -5,12 +5,9 @@ if [ -n "${OPENVIDU_APPLICATION_SERVER_URL}" ]; then
sed -i \
"s|var APPLICATION_SERVER_URL = \"http://localhost:5000/\";|var APPLICATION_SERVER_URL = \"${OPENVIDU_APPLICATION_SERVER_URL}/\";|" \
public/app.js
-fi
-
-if [ -n "${SERVER_PORT}" ]; then
- # Replace SERVER_PORT at frontend app
+else
sed -i \
- "s|var APPLICATION_SERVER_URL = \"http://localhost:5000/\";|var APPLICATION_SERVER_URL = \"http://localhost:${SERVER_PORT}/\";|" \
+ "s|var APPLICATION_SERVER_URL = \"http://localhost:5000/\";|var APPLICATION_SERVER_URL = \"\";|" \
public/app.js
fi
diff --git a/openvidu-webcomponent/docker/Dockerfile b/openvidu-webcomponent/docker/Dockerfile
new file mode 100644
index 00000000..38dde55a
--- /dev/null
+++ b/openvidu-webcomponent/docker/Dockerfile
@@ -0,0 +1,17 @@
+FROM node:16-alpine3.16
+
+# Copy openvidu-basic-node
+COPY ./openvidu-basic-node /opt/openvidu-basic-node
+
+# Install openvidu-basic-node dependencies
+RUN npm --prefix /opt/openvidu-basic-node install
+
+# Copy static files to openvidu-basic-node
+RUN mkdir -p /opt/openvidu-basic-node/public
+COPY ./web /opt/openvidu-basic-node/public
+
+WORKDIR /opt/openvidu-basic-node
+
+COPY docker/entrypoint.sh .
+
+ENTRYPOINT [ "./entrypoint.sh" ]
\ No newline at end of file
diff --git a/openvidu-webcomponent/docker/create_image.sh b/openvidu-webcomponent/docker/create_image.sh
new file mode 100755
index 00000000..e7a4949f
--- /dev/null
+++ b/openvidu-webcomponent/docker/create_image.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+if [ $# -eq 0 ]; then
+ echo "No version argument provided. Usage: \"./create_image.sh \""
+ exit 1
+fi
+
+pushd ../
+
+cp -r ../openvidu-basic-node .
+
+trap 'rm -rf ./openvidu-basic-node' ERR
+
+docker build --pull --no-cache --rm=true -f docker/Dockerfile -t "$1" .
+
+rm -rf ./openvidu-basic-node
\ No newline at end of file
diff --git a/openvidu-webcomponent/docker/entrypoint.sh b/openvidu-webcomponent/docker/entrypoint.sh
new file mode 100755
index 00000000..aba13997
--- /dev/null
+++ b/openvidu-webcomponent/docker/entrypoint.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+if [ -n "${OPENVIDU_APPLICATION_SERVER_URL}" ]; then
+ # Replace OPENVIDU_APPLICATION_SERVER_URL at frontend app
+ sed -i \
+ "s|var APPLICATION_SERVER_URL = \"http://localhost:5000/\";|var APPLICATION_SERVER_URL = \"${OPENVIDU_APPLICATION_SERVER_URL}/\";|" \
+ public/app.js
+else
+ sed -i \
+ "s|var APPLICATION_SERVER_URL = \"http://localhost:5000/\";|var APPLICATION_SERVER_URL = \"\";|" \
+ public/app.js
+fi
+
+exec node index.js "$*"
\ No newline at end of file