openvidu-components: Updated ports and configured urls
This commit is contained in:
parent
d4271544d3
commit
3b69def2ef
13692
openvidu-components/openvidu-additional-panels/package-lock.json
generated
13692
openvidu-components/openvidu-additional-panels/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,35 +1,34 @@
|
||||
{
|
||||
"name": "openvidu-additional-panels",
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"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": {
|
||||
"@angular/animations": "^18.0.1",
|
||||
"@angular/cdk": "^18.0.1",
|
||||
"@angular/common": "^18.0.1",
|
||||
"@angular/compiler": "^18.0.1",
|
||||
"@angular/core": "^18.0.1",
|
||||
"@angular/forms": "^18.0.1",
|
||||
"@angular/material": "^18.0.1",
|
||||
"@angular/platform-browser": "^18.0.1",
|
||||
"@angular/platform-browser-dynamic": "^18.0.1",
|
||||
"@angular/router": "^18.0.1",
|
||||
"openvidu-angular": "file:../openvidu-angular-3.0.0-dev.tgz",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/build": "^18.0.2",
|
||||
"@angular/cli": "^18.0.2",
|
||||
"@angular/compiler-cli": "^18.0.1",
|
||||
"@types/node": "^20.12.12",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
"name": "openvidu-additional-panels",
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"start": "ng serve --port=5080 --host=0.0.0.0",
|
||||
"build": "ng build",
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"build:prod": "ng build --output-path ./openvidu-basic-node/public/ --configuration production"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^18.0.1",
|
||||
"@angular/cdk": "^18.0.1",
|
||||
"@angular/common": "^18.0.1",
|
||||
"@angular/compiler": "^18.0.1",
|
||||
"@angular/core": "^18.0.1",
|
||||
"@angular/forms": "^18.0.1",
|
||||
"@angular/material": "^18.0.1",
|
||||
"@angular/platform-browser": "^18.0.1",
|
||||
"@angular/platform-browser-dynamic": "^18.0.1",
|
||||
"@angular/router": "^18.0.1",
|
||||
"openvidu-angular": "file:../openvidu-angular-3.0.0-dev.tgz",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/build": "^18.0.2",
|
||||
"@angular/cli": "^18.0.2",
|
||||
"@angular/compiler-cli": "^18.0.1",
|
||||
"@types/node": "^20.12.12",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
}
|
||||
@ -9,7 +9,6 @@ import {
|
||||
ApiDirectiveModule,
|
||||
OpenViduAngularDirectiveModule,
|
||||
} from 'openvidu-angular';
|
||||
import { environment } from 'src/environments/environment';
|
||||
|
||||
import { MatIcon } from '@angular/material/icon';
|
||||
import { MatIconButton } from '@angular/material/button';
|
||||
@ -63,9 +62,10 @@ import { CommonModule } from '@angular/common';
|
||||
],
|
||||
})
|
||||
export class AppComponent {
|
||||
// Define the URL of the application server
|
||||
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||
LIVEKIT_URL = environment.livekitUrl;
|
||||
// For local development, leave these variables empty
|
||||
// For production, configure them with correct URLs depending on your deployment
|
||||
APPLICATION_SERVER_URL = '';
|
||||
LIVEKIT_URL = '';
|
||||
|
||||
// Define the name of the room and initialize the token variable
|
||||
roomName = 'additional-panels';
|
||||
@ -78,12 +78,35 @@ export class AppComponent {
|
||||
constructor(
|
||||
private httpClient: HttpClient,
|
||||
private panelService: PanelService
|
||||
) {}
|
||||
) {
|
||||
this.configureUrls();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.subscribeToPanelToggling();
|
||||
}
|
||||
|
||||
private configureUrls() {
|
||||
// If APPLICATION_SERVER_URL is not configured, use default value from local development
|
||||
if (!this.APPLICATION_SERVER_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.APPLICATION_SERVER_URL = 'http://localhost:6080/';
|
||||
} else {
|
||||
this.APPLICATION_SERVER_URL =
|
||||
'https://' + window.location.hostname + ':6443/';
|
||||
}
|
||||
}
|
||||
|
||||
// If LIVEKIT_URL is not configured, use default value from local development
|
||||
if (!this.LIVEKIT_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.LIVEKIT_URL = 'ws://localhost:7880/';
|
||||
} else {
|
||||
this.LIVEKIT_URL = 'wss://' + window.location.hostname + ':7443/';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Function to request a token when a participant joins the room
|
||||
async onTokenRequested(participantName: any) {
|
||||
const { token } = await this.getToken(this.roomName, participantName);
|
||||
@ -108,10 +131,10 @@ export class AppComponent {
|
||||
try {
|
||||
// Send a POST request to the server to obtain a token
|
||||
return lastValueFrom(
|
||||
this.httpClient.post<any>(
|
||||
this.APPLICATION_SERVER_URL + 'token',
|
||||
{ roomName, participantName }
|
||||
)
|
||||
this.httpClient.post<any>(this.APPLICATION_SERVER_URL + 'token', {
|
||||
roomName,
|
||||
participantName,
|
||||
})
|
||||
);
|
||||
} catch (error: any) {
|
||||
// Handle errors, e.g., if the server is not reachable
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
applicationServerUrl: '',
|
||||
production: true,
|
||||
};
|
||||
|
||||
@ -3,9 +3,7 @@
|
||||
// The list of file replacements can be found in `angular.json`.
|
||||
|
||||
export const environment = {
|
||||
production: false,
|
||||
applicationServerUrl: 'http://localhost:6080/',
|
||||
livekitUrl: 'http://localhost:7880/',
|
||||
production: false,
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -3,10 +3,10 @@
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"start": "ng serve --port=5080 --host=0.0.0.0",
|
||||
"build": "ng build",
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"build:prod": "./node_modules/@angular/cli/bin/ng.js build --output-path ./openvidu-basic-node/public/ --configuration production"
|
||||
"build:prod": "ng build --output-path ./openvidu-basic-node/public/ --configuration production"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,35 +1,35 @@
|
||||
{
|
||||
"name": "openvidu-custom-activities-panel",
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"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": {
|
||||
"@angular/animations": "^18.0.1",
|
||||
"@angular/cdk": "^18.0.1",
|
||||
"@angular/common": "^18.0.1",
|
||||
"@angular/compiler": "^18.0.1",
|
||||
"@angular/core": "^18.0.1",
|
||||
"@angular/forms": "^18.0.1",
|
||||
"@angular/material": "^18.0.1",
|
||||
"@angular/platform-browser": "^18.0.1",
|
||||
"@angular/platform-browser-dynamic": "^18.0.1",
|
||||
"@angular/router": "^18.0.1",
|
||||
"openvidu-angular": "file:../openvidu-angular-3.0.0-dev.tgz",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/build": "^18.0.2",
|
||||
"@angular/cli": "^18.0.2",
|
||||
"@angular/compiler-cli": "^18.0.1",
|
||||
"@types/node": "^20.12.12",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
"name": "openvidu-custom-activities-panel",
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve --port=5080 --host=0.0.0.0",
|
||||
"build": "ng build",
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"build:prod": "ng build --output-path ./openvidu-basic-node/public/ --configuration production"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^18.0.1",
|
||||
"@angular/cdk": "^18.0.1",
|
||||
"@angular/common": "^18.0.1",
|
||||
"@angular/compiler": "^18.0.1",
|
||||
"@angular/core": "^18.0.1",
|
||||
"@angular/forms": "^18.0.1",
|
||||
"@angular/material": "^18.0.1",
|
||||
"@angular/platform-browser": "^18.0.1",
|
||||
"@angular/platform-browser-dynamic": "^18.0.1",
|
||||
"@angular/router": "^18.0.1",
|
||||
"openvidu-angular": "file:../openvidu-angular-3.0.0-dev.tgz",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/build": "^18.0.2",
|
||||
"@angular/cli": "^18.0.2",
|
||||
"@angular/compiler-cli": "^18.0.1",
|
||||
"@types/node": "^20.12.12",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
}
|
||||
@ -1,40 +1,70 @@
|
||||
import { HttpClient } from "@angular/common/http";
|
||||
import { Component } from "@angular/core";
|
||||
import { lastValueFrom } from "rxjs";
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Component } from '@angular/core';
|
||||
import { lastValueFrom } from 'rxjs';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { OpenViduAngularModule, ApiDirectiveModule, OpenViduAngularDirectiveModule } from "openvidu-angular";
|
||||
import {
|
||||
OpenViduAngularModule,
|
||||
ApiDirectiveModule,
|
||||
OpenViduAngularDirectiveModule,
|
||||
} from 'openvidu-angular';
|
||||
|
||||
@Component({
|
||||
selector: "app-root",
|
||||
template: `
|
||||
selector: 'app-root',
|
||||
template: `
|
||||
<ov-videoconference
|
||||
[token]="token"
|
||||
[livekitUrl]="LIVEKIT_URL"
|
||||
[toolbarRecordingButton]="false"
|
||||
[toolbarDisplayRoomName]="false"
|
||||
(onTokenRequested)="onTokenRequested($event)">
|
||||
|
||||
(onTokenRequested)="onTokenRequested($event)"
|
||||
>
|
||||
<!-- Custom activities panel -->
|
||||
<div *ovActivitiesPanel id="my-panel">
|
||||
<h3>ACTIVITIES</h3>
|
||||
<div>
|
||||
CUSTOM ACTIVITIES
|
||||
</div>
|
||||
<div>CUSTOM ACTIVITIES</div>
|
||||
</div>
|
||||
</ov-videoconference>
|
||||
`,
|
||||
styleUrls: ['./app.component.scss'],
|
||||
standalone: true,
|
||||
imports: [OpenViduAngularModule, ApiDirectiveModule, OpenViduAngularDirectiveModule]
|
||||
styleUrls: ['./app.component.scss'],
|
||||
standalone: true,
|
||||
imports: [
|
||||
OpenViduAngularModule,
|
||||
ApiDirectiveModule,
|
||||
OpenViduAngularDirectiveModule,
|
||||
],
|
||||
})
|
||||
export class AppComponent {
|
||||
|
||||
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||
LIVEKIT_URL = environment.livekitUrl;
|
||||
roomName = "custom-activities-panel";
|
||||
// For local development, leave these variables empty
|
||||
// For production, configure them with correct URLs depending on your deployment
|
||||
APPLICATION_SERVER_URL = '';
|
||||
LIVEKIT_URL = '';
|
||||
roomName = 'custom-activities-panel';
|
||||
token!: string;
|
||||
|
||||
constructor(private httpClient: HttpClient) { }
|
||||
constructor(private httpClient: HttpClient) {
|
||||
this.configureUrls();
|
||||
}
|
||||
|
||||
configureUrls() {
|
||||
// If APPLICATION_SERVER_URL is not configured, use default value from local development
|
||||
if (!this.APPLICATION_SERVER_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.APPLICATION_SERVER_URL = 'http://localhost:6080/';
|
||||
} else {
|
||||
this.APPLICATION_SERVER_URL =
|
||||
'https://' + window.location.hostname + ':6443/';
|
||||
}
|
||||
}
|
||||
|
||||
// If LIVEKIT_URL is not configured, use default value from local development
|
||||
if (!this.LIVEKIT_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.LIVEKIT_URL = 'ws://localhost:7880/';
|
||||
} else {
|
||||
this.LIVEKIT_URL = 'wss://' + window.location.hostname + ':7443/';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async onTokenRequested(participantName: string) {
|
||||
const { token } = await this.getToken(this.roomName, participantName);
|
||||
@ -43,10 +73,18 @@ export class AppComponent {
|
||||
|
||||
getToken(roomName: string, participantName: string): Promise<any> {
|
||||
try {
|
||||
return lastValueFrom(this.httpClient.post<any>(this.APPLICATION_SERVER_URL + 'token', { roomName, participantName }));
|
||||
return lastValueFrom(
|
||||
this.httpClient.post<any>(this.APPLICATION_SERVER_URL + 'token', {
|
||||
roomName,
|
||||
participantName,
|
||||
})
|
||||
);
|
||||
} catch (error: any) {
|
||||
if (error.status === 404) {
|
||||
throw { status: error.status, message: 'Cannot connect with backend. ' + error.url + ' not found' };
|
||||
throw {
|
||||
status: error.status,
|
||||
message: 'Cannot connect with backend. ' + error.url + ' not found',
|
||||
};
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
applicationServerUrl: '',
|
||||
livekitUrl: ''
|
||||
production: true,
|
||||
};
|
||||
|
||||
@ -1,18 +1,3 @@
|
||||
// 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,
|
||||
applicationServerUrl: 'http://localhost:6080/',
|
||||
livekitUrl: 'http://localhost:7880/'
|
||||
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.
|
||||
|
||||
13692
openvidu-components/openvidu-custom-chat-panel/package-lock.json
generated
13692
openvidu-components/openvidu-custom-chat-panel/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,35 +1,35 @@
|
||||
{
|
||||
"name": "openvidu-custom-chat-panel",
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"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": {
|
||||
"@angular/animations": "^18.0.1",
|
||||
"@angular/cdk": "^18.0.1",
|
||||
"@angular/common": "^18.0.1",
|
||||
"@angular/compiler": "^18.0.1",
|
||||
"@angular/core": "^18.0.1",
|
||||
"@angular/forms": "^18.0.1",
|
||||
"@angular/material": "^18.0.1",
|
||||
"@angular/platform-browser": "^18.0.1",
|
||||
"@angular/platform-browser-dynamic": "^18.0.1",
|
||||
"@angular/router": "^18.0.1",
|
||||
"openvidu-angular": "file:../openvidu-angular-3.0.0-dev.tgz",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/build": "^18.0.2",
|
||||
"@angular/cli": "^18.0.2",
|
||||
"@angular/compiler-cli": "^18.0.1",
|
||||
"@types/node": "^20.12.12",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
"name": "openvidu-custom-chat-panel",
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve --port=5080 --host=0.0.0.0",
|
||||
"build": "ng build",
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"build:prod": "ng build --output-path ./openvidu-basic-node/public/ --configuration production"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^18.0.1",
|
||||
"@angular/cdk": "^18.0.1",
|
||||
"@angular/common": "^18.0.1",
|
||||
"@angular/compiler": "^18.0.1",
|
||||
"@angular/core": "^18.0.1",
|
||||
"@angular/forms": "^18.0.1",
|
||||
"@angular/material": "^18.0.1",
|
||||
"@angular/platform-browser": "^18.0.1",
|
||||
"@angular/platform-browser-dynamic": "^18.0.1",
|
||||
"@angular/router": "^18.0.1",
|
||||
"openvidu-angular": "file:../openvidu-angular-3.0.0-dev.tgz",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/build": "^18.0.2",
|
||||
"@angular/cli": "^18.0.2",
|
||||
"@angular/compiler-cli": "^18.0.1",
|
||||
"@types/node": "^20.12.12",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
}
|
||||
@ -51,9 +51,10 @@ import { environment } from 'src/environments/environment';
|
||||
],
|
||||
})
|
||||
export class AppComponent {
|
||||
// Define the URL of the application server
|
||||
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||
LIVEKIT_URL = environment.livekitUrl;
|
||||
// For local development, leave these variables empty
|
||||
// For production, configure them with correct URLs depending on your deployment
|
||||
APPLICATION_SERVER_URL = '';
|
||||
LIVEKIT_URL = '';
|
||||
|
||||
// Define the name of the room and initialize the token variable
|
||||
roomName = 'chat-panel-directive-example';
|
||||
@ -63,7 +64,30 @@ export class AppComponent {
|
||||
constructor(
|
||||
private httpClient: HttpClient,
|
||||
private participantService: ParticipantService
|
||||
) {}
|
||||
) {
|
||||
this.configureUrls();
|
||||
}
|
||||
|
||||
private configureUrls() {
|
||||
// If APPLICATION_SERVER_URL is not configured, use default value from local development
|
||||
if (!this.APPLICATION_SERVER_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.APPLICATION_SERVER_URL = 'http://localhost:6080/';
|
||||
} else {
|
||||
this.APPLICATION_SERVER_URL =
|
||||
'https://' + window.location.hostname + ':6443/';
|
||||
}
|
||||
}
|
||||
|
||||
// If LIVEKIT_URL is not configured, use default value from local development
|
||||
if (!this.LIVEKIT_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.LIVEKIT_URL = 'ws://localhost:7880/';
|
||||
} else {
|
||||
this.LIVEKIT_URL = 'wss://' + window.location.hostname + ':7443/';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Function to request a token when a participant joins the room
|
||||
async onTokenRequested(participantName: string) {
|
||||
@ -105,13 +129,10 @@ export class AppComponent {
|
||||
try {
|
||||
// Send a POST request to the server to obtain a token
|
||||
return lastValueFrom(
|
||||
this.httpClient.post<any>(
|
||||
this.APPLICATION_SERVER_URL + 'token',
|
||||
{
|
||||
roomName,
|
||||
participantName,
|
||||
}
|
||||
)
|
||||
this.httpClient.post<any>(this.APPLICATION_SERVER_URL + 'token', {
|
||||
roomName,
|
||||
participantName,
|
||||
})
|
||||
);
|
||||
} catch (error: any) {
|
||||
// Handle errors, e.g., if the server is not reachable
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
applicationServerUrl: '',
|
||||
livekitUrl: '',
|
||||
};
|
||||
|
||||
@ -1,18 +1,3 @@
|
||||
// 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,
|
||||
applicationServerUrl: 'http://localhost:6080/',
|
||||
livekitUrl: 'http://localhost:7880/',
|
||||
};
|
||||
|
||||
/*
|
||||
* 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.
|
||||
|
||||
13692
openvidu-components/openvidu-custom-layout/package-lock.json
generated
13692
openvidu-components/openvidu-custom-layout/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,35 +1,35 @@
|
||||
{
|
||||
"name": "openvidu-custom-layout",
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"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": {
|
||||
"@angular/animations": "^18.0.1",
|
||||
"@angular/cdk": "^18.0.1",
|
||||
"@angular/common": "^18.0.1",
|
||||
"@angular/compiler": "^18.0.1",
|
||||
"@angular/core": "^18.0.1",
|
||||
"@angular/forms": "^18.0.1",
|
||||
"@angular/material": "^18.0.1",
|
||||
"@angular/platform-browser": "^18.0.1",
|
||||
"@angular/platform-browser-dynamic": "^18.0.1",
|
||||
"@angular/router": "^18.0.1",
|
||||
"openvidu-angular": "file:../openvidu-angular-3.0.0-dev.tgz",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/build": "^18.0.2",
|
||||
"@angular/cli": "^18.0.2",
|
||||
"@angular/compiler-cli": "^18.0.1",
|
||||
"@types/node": "^20.12.12",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
"name": "openvidu-custom-layout",
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve --port=5080 --host=0.0.0.0",
|
||||
"build": "ng build",
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"build:prod": "ng build --output-path ./openvidu-basic-node/public/ --configuration production"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^18.0.1",
|
||||
"@angular/cdk": "^18.0.1",
|
||||
"@angular/common": "^18.0.1",
|
||||
"@angular/compiler": "^18.0.1",
|
||||
"@angular/core": "^18.0.1",
|
||||
"@angular/forms": "^18.0.1",
|
||||
"@angular/material": "^18.0.1",
|
||||
"@angular/platform-browser": "^18.0.1",
|
||||
"@angular/platform-browser-dynamic": "^18.0.1",
|
||||
"@angular/router": "^18.0.1",
|
||||
"openvidu-angular": "file:../openvidu-angular-3.0.0-dev.tgz",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/build": "^18.0.2",
|
||||
"@angular/cli": "^18.0.2",
|
||||
"@angular/compiler-cli": "^18.0.1",
|
||||
"@types/node": "^20.12.12",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
}
|
||||
@ -62,9 +62,10 @@ import { NgClass } from '@angular/common';
|
||||
],
|
||||
})
|
||||
export class AppComponent implements OnInit, OnDestroy {
|
||||
// Define the URL of the application server
|
||||
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||
LIVEKIT_URL = environment.livekitUrl;
|
||||
// For local development, leave these variables empty
|
||||
// For production, configure them with correct URLs depending on your deployment
|
||||
APPLICATION_SERVER_URL = '';
|
||||
LIVEKIT_URL = '';
|
||||
|
||||
// Define the name of the room and initialize the token variable
|
||||
roomName = 'custom-layout';
|
||||
@ -79,7 +80,30 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
constructor(
|
||||
private httpClient: HttpClient,
|
||||
private participantService: ParticipantService
|
||||
) {}
|
||||
) {
|
||||
this.configureUrls();
|
||||
}
|
||||
|
||||
private configureUrls() {
|
||||
// If APPLICATION_SERVER_URL is not configured, use default value from local development
|
||||
if (!this.APPLICATION_SERVER_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.APPLICATION_SERVER_URL = 'http://localhost:6080/';
|
||||
} else {
|
||||
this.APPLICATION_SERVER_URL =
|
||||
'https://' + window.location.hostname + ':6443/';
|
||||
}
|
||||
}
|
||||
|
||||
// If LIVEKIT_URL is not configured, use default value from local development
|
||||
if (!this.LIVEKIT_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.LIVEKIT_URL = 'ws://localhost:7880/';
|
||||
} else {
|
||||
this.LIVEKIT_URL = 'wss://' + window.location.hostname + ':7443/';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
// Subscribe to participants' updates
|
||||
@ -118,13 +142,10 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
try {
|
||||
// Send a POST request to the server to obtain a token
|
||||
return lastValueFrom(
|
||||
this.httpClient.post<any>(
|
||||
this.APPLICATION_SERVER_URL + 'token',
|
||||
{
|
||||
roomName,
|
||||
participantName,
|
||||
}
|
||||
)
|
||||
this.httpClient.post<any>(this.APPLICATION_SERVER_URL + 'token', {
|
||||
roomName,
|
||||
participantName,
|
||||
})
|
||||
);
|
||||
} catch (error: any) {
|
||||
// Handle errors, e.g., if the server is not reachable
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
applicationServerUrl: '',
|
||||
livekitUrl: '',
|
||||
};
|
||||
|
||||
@ -1,18 +1,3 @@
|
||||
// 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,
|
||||
applicationServerUrl: 'http://localhost:6080/',
|
||||
livekitUrl: 'http://localhost:7880/',
|
||||
};
|
||||
|
||||
/*
|
||||
* 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.
|
||||
|
||||
13692
openvidu-components/openvidu-custom-panels/package-lock.json
generated
13692
openvidu-components/openvidu-custom-panels/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,35 +1,35 @@
|
||||
{
|
||||
"name": "openvidu-custom-panels",
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"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": {
|
||||
"@angular/animations": "^18.0.1",
|
||||
"@angular/cdk": "^18.0.1",
|
||||
"@angular/common": "^18.0.1",
|
||||
"@angular/compiler": "^18.0.1",
|
||||
"@angular/core": "^18.0.1",
|
||||
"@angular/forms": "^18.0.1",
|
||||
"@angular/material": "^18.0.1",
|
||||
"@angular/platform-browser": "^18.0.1",
|
||||
"@angular/platform-browser-dynamic": "^18.0.1",
|
||||
"@angular/router": "^18.0.1",
|
||||
"openvidu-angular": "file:../openvidu-angular-3.0.0-dev.tgz",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/build": "^18.0.2",
|
||||
"@angular/cli": "^18.0.2",
|
||||
"@angular/compiler-cli": "^18.0.1",
|
||||
"@types/node": "^20.12.12",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
"name": "openvidu-custom-panels",
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve --port=5080 --host=0.0.0.0",
|
||||
"build": "ng build",
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"build:prod": "ng build --output-path ./openvidu-basic-node/public/ --configuration production"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^18.0.1",
|
||||
"@angular/cdk": "^18.0.1",
|
||||
"@angular/common": "^18.0.1",
|
||||
"@angular/compiler": "^18.0.1",
|
||||
"@angular/core": "^18.0.1",
|
||||
"@angular/forms": "^18.0.1",
|
||||
"@angular/material": "^18.0.1",
|
||||
"@angular/platform-browser": "^18.0.1",
|
||||
"@angular/platform-browser-dynamic": "^18.0.1",
|
||||
"@angular/router": "^18.0.1",
|
||||
"openvidu-angular": "file:../openvidu-angular-3.0.0-dev.tgz",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/build": "^18.0.2",
|
||||
"@angular/cli": "^18.0.2",
|
||||
"@angular/compiler-cli": "^18.0.1",
|
||||
"@types/node": "^20.12.12",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
}
|
||||
@ -44,15 +44,39 @@ import {
|
||||
],
|
||||
})
|
||||
export class AppComponent {
|
||||
// Define the URL of the application server
|
||||
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||
LIVEKIT_URL = environment.livekitUrl;
|
||||
// For local development, leave these variables empty
|
||||
// For production, configure them with correct URLs depending on your deployment
|
||||
APPLICATION_SERVER_URL = '';
|
||||
LIVEKIT_URL = '';
|
||||
|
||||
// Define the name of the room and initialize the token variable
|
||||
roomName = 'custom-panels';
|
||||
token!: string;
|
||||
|
||||
constructor(private httpClient: HttpClient) {}
|
||||
constructor(private httpClient: HttpClient) {
|
||||
this.configureUrls();
|
||||
}
|
||||
|
||||
private configureUrls() {
|
||||
// If APPLICATION_SERVER_URL is not configured, use default value from local development
|
||||
if (!this.APPLICATION_SERVER_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.APPLICATION_SERVER_URL = 'http://localhost:6080/';
|
||||
} else {
|
||||
this.APPLICATION_SERVER_URL =
|
||||
'https://' + window.location.hostname + ':6443/';
|
||||
}
|
||||
}
|
||||
|
||||
// If LIVEKIT_URL is not configured, use default value from local development
|
||||
if (!this.LIVEKIT_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.LIVEKIT_URL = 'ws://localhost:7880/';
|
||||
} else {
|
||||
this.LIVEKIT_URL = 'wss://' + window.location.hostname + ':7443/';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Function to request a token when a participant joins the room
|
||||
async onTokenRequested(participantName: string) {
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
applicationServerUrl: '',
|
||||
livekitUrl: '',
|
||||
};
|
||||
|
||||
@ -1,18 +1,3 @@
|
||||
// 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,
|
||||
applicationServerUrl: 'http://localhost:6080/',
|
||||
livekitUrl: 'http://localhost:7880/',
|
||||
};
|
||||
|
||||
/*
|
||||
* 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.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,35 +1,35 @@
|
||||
{
|
||||
"name": "openvidu-custom-participant-panel-item-elements",
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"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": {
|
||||
"@angular/animations": "^18.0.1",
|
||||
"@angular/cdk": "^18.0.1",
|
||||
"@angular/common": "^18.0.1",
|
||||
"@angular/compiler": "^18.0.1",
|
||||
"@angular/core": "^18.0.1",
|
||||
"@angular/forms": "^18.0.1",
|
||||
"@angular/material": "^18.0.1",
|
||||
"@angular/platform-browser": "^18.0.1",
|
||||
"@angular/platform-browser-dynamic": "^18.0.1",
|
||||
"@angular/router": "^18.0.1",
|
||||
"openvidu-angular": "file:../openvidu-angular-3.0.0-dev.tgz",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/build": "^18.0.2",
|
||||
"@angular/cli": "^18.0.2",
|
||||
"@angular/compiler-cli": "^18.0.1",
|
||||
"@types/node": "^20.12.12",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
"name": "openvidu-custom-participant-panel-item-elements",
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve --port=5080 --host=0.0.0.0",
|
||||
"build": "ng build",
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"build:prod": "ng build --output-path ./openvidu-basic-node/public/ --configuration production"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^18.0.1",
|
||||
"@angular/cdk": "^18.0.1",
|
||||
"@angular/common": "^18.0.1",
|
||||
"@angular/compiler": "^18.0.1",
|
||||
"@angular/core": "^18.0.1",
|
||||
"@angular/forms": "^18.0.1",
|
||||
"@angular/material": "^18.0.1",
|
||||
"@angular/platform-browser": "^18.0.1",
|
||||
"@angular/platform-browser-dynamic": "^18.0.1",
|
||||
"@angular/router": "^18.0.1",
|
||||
"openvidu-angular": "file:../openvidu-angular-3.0.0-dev.tgz",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/build": "^18.0.2",
|
||||
"@angular/cli": "^18.0.2",
|
||||
"@angular/compiler-cli": "^18.0.1",
|
||||
"@types/node": "^20.12.12",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
}
|
||||
@ -45,9 +45,10 @@ import { environment } from 'src/environments/environment';
|
||||
],
|
||||
})
|
||||
export class AppComponent {
|
||||
// Define the URL of the application server
|
||||
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||
LIVEKIT_URL = environment.livekitUrl;
|
||||
// For local development, leave these variables empty
|
||||
// For production, configure them with correct URLs depending on your deployment
|
||||
APPLICATION_SERVER_URL = '';
|
||||
LIVEKIT_URL = '';
|
||||
|
||||
// Define the name of the room and initialize the token variable
|
||||
roomName = 'participant-panel-item-elements';
|
||||
@ -59,7 +60,30 @@ export class AppComponent {
|
||||
constructor(
|
||||
private httpClient: HttpClient,
|
||||
private openviduService: OpenViduService
|
||||
) {}
|
||||
) {
|
||||
this.configureUrls();
|
||||
}
|
||||
|
||||
private configureUrls() {
|
||||
// If APPLICATION_SERVER_URL is not configured, use default value from local development
|
||||
if (!this.APPLICATION_SERVER_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.APPLICATION_SERVER_URL = 'http://localhost:6080/';
|
||||
} else {
|
||||
this.APPLICATION_SERVER_URL =
|
||||
'https://' + window.location.hostname + ':6443/';
|
||||
}
|
||||
}
|
||||
|
||||
// If LIVEKIT_URL is not configured, use default value from local development
|
||||
if (!this.LIVEKIT_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.LIVEKIT_URL = 'ws://localhost:7880/';
|
||||
} else {
|
||||
this.LIVEKIT_URL = 'wss://' + window.location.hostname + ':7443/';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Function to request a token when a participant joins the room
|
||||
async onTokenRequested(participantName: string) {
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
applicationServerUrl: '',
|
||||
livekitUrl: '',
|
||||
};
|
||||
|
||||
@ -1,18 +1,3 @@
|
||||
// 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,
|
||||
applicationServerUrl: 'http://localhost:6080/',
|
||||
livekitUrl: 'http://localhost:7880/',
|
||||
};
|
||||
|
||||
/*
|
||||
* 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.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,35 +1,35 @@
|
||||
{
|
||||
"name": "openvidu-custom-participant-panel-item",
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"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": {
|
||||
"@angular/animations": "^18.0.1",
|
||||
"@angular/cdk": "^18.0.1",
|
||||
"@angular/common": "^18.0.1",
|
||||
"@angular/compiler": "^18.0.1",
|
||||
"@angular/core": "^18.0.1",
|
||||
"@angular/forms": "^18.0.1",
|
||||
"@angular/material": "^18.0.1",
|
||||
"@angular/platform-browser": "^18.0.1",
|
||||
"@angular/platform-browser-dynamic": "^18.0.1",
|
||||
"@angular/router": "^18.0.1",
|
||||
"openvidu-angular": "file:../openvidu-angular-3.0.0-dev.tgz",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/build": "^18.0.2",
|
||||
"@angular/cli": "^18.0.2",
|
||||
"@angular/compiler-cli": "^18.0.1",
|
||||
"@types/node": "^20.12.12",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
"name": "openvidu-custom-participant-panel-item",
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve --port=5080 --host=0.0.0.0",
|
||||
"build": "ng build",
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"build:prod": "ng build --output-path ./openvidu-basic-node/public/ --configuration production"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^18.0.1",
|
||||
"@angular/cdk": "^18.0.1",
|
||||
"@angular/common": "^18.0.1",
|
||||
"@angular/compiler": "^18.0.1",
|
||||
"@angular/core": "^18.0.1",
|
||||
"@angular/forms": "^18.0.1",
|
||||
"@angular/material": "^18.0.1",
|
||||
"@angular/platform-browser": "^18.0.1",
|
||||
"@angular/platform-browser-dynamic": "^18.0.1",
|
||||
"@angular/router": "^18.0.1",
|
||||
"openvidu-angular": "file:../openvidu-angular-3.0.0-dev.tgz",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/build": "^18.0.2",
|
||||
"@angular/cli": "^18.0.2",
|
||||
"@angular/compiler-cli": "^18.0.1",
|
||||
"@types/node": "^20.12.12",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
}
|
||||
@ -52,15 +52,39 @@ import {
|
||||
],
|
||||
})
|
||||
export class AppComponent {
|
||||
// Define the URL of the application server
|
||||
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||
LIVEKIT_URL = environment.livekitUrl;
|
||||
// For local development, leave these variables empty
|
||||
// For production, configure them with correct URLs depending on your deployment
|
||||
APPLICATION_SERVER_URL = '';
|
||||
LIVEKIT_URL = '';
|
||||
|
||||
// Define the name of the room and initialize the token variable
|
||||
roomName = 'participant-panel-item';
|
||||
token!: string;
|
||||
|
||||
constructor(private httpClient: HttpClient) {}
|
||||
constructor(private httpClient: HttpClient) {
|
||||
this.configureUrls();
|
||||
}
|
||||
|
||||
private configureUrls() {
|
||||
// If APPLICATION_SERVER_URL is not configured, use default value from local development
|
||||
if (!this.APPLICATION_SERVER_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.APPLICATION_SERVER_URL = 'http://localhost:6080/';
|
||||
} else {
|
||||
this.APPLICATION_SERVER_URL =
|
||||
'https://' + window.location.hostname + ':6443/';
|
||||
}
|
||||
}
|
||||
|
||||
// If LIVEKIT_URL is not configured, use default value from local development
|
||||
if (!this.LIVEKIT_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.LIVEKIT_URL = 'ws://localhost:7880/';
|
||||
} else {
|
||||
this.LIVEKIT_URL = 'wss://' + window.location.hostname + ':7443/';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Function to request a token when a participant joins the room
|
||||
async onTokenRequested(participantName: string) {
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
applicationServerUrl: '',
|
||||
livekitUrl: '',
|
||||
};
|
||||
|
||||
@ -1,18 +1,3 @@
|
||||
// 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,
|
||||
applicationServerUrl: 'http://localhost:6080/',
|
||||
livekitUrl: 'http://localhost:7880/',
|
||||
};
|
||||
|
||||
/*
|
||||
* 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.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,35 +1,35 @@
|
||||
{
|
||||
"name": "openvidu-custom-participants-panel",
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"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": {
|
||||
"@angular/animations": "^18.0.1",
|
||||
"@angular/cdk": "^18.0.1",
|
||||
"@angular/common": "^18.0.1",
|
||||
"@angular/compiler": "^18.0.1",
|
||||
"@angular/core": "^18.0.1",
|
||||
"@angular/forms": "^18.0.1",
|
||||
"@angular/material": "^18.0.1",
|
||||
"@angular/platform-browser": "^18.0.1",
|
||||
"@angular/platform-browser-dynamic": "^18.0.1",
|
||||
"@angular/router": "^18.0.1",
|
||||
"openvidu-angular": "file:../openvidu-angular-3.0.0-dev.tgz",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/build": "^18.0.2",
|
||||
"@angular/cli": "^18.0.2",
|
||||
"@angular/compiler-cli": "^18.0.1",
|
||||
"@types/node": "^20.12.12",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
"name": "openvidu-custom-participants-panel",
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve --port=5080 --host=0.0.0.0",
|
||||
"build": "ng build",
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"build:prod": "ng build --output-path ./openvidu-basic-node/public/ --configuration production"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^18.0.1",
|
||||
"@angular/cdk": "^18.0.1",
|
||||
"@angular/common": "^18.0.1",
|
||||
"@angular/compiler": "^18.0.1",
|
||||
"@angular/core": "^18.0.1",
|
||||
"@angular/forms": "^18.0.1",
|
||||
"@angular/material": "^18.0.1",
|
||||
"@angular/platform-browser": "^18.0.1",
|
||||
"@angular/platform-browser-dynamic": "^18.0.1",
|
||||
"@angular/router": "^18.0.1",
|
||||
"openvidu-angular": "file:../openvidu-angular-3.0.0-dev.tgz",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/build": "^18.0.2",
|
||||
"@angular/cli": "^18.0.2",
|
||||
"@angular/compiler-cli": "^18.0.1",
|
||||
"@types/node": "^20.12.12",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
}
|
||||
@ -42,9 +42,10 @@ import { environment } from 'src/environments/environment';
|
||||
],
|
||||
})
|
||||
export class AppComponent implements OnInit, OnDestroy {
|
||||
// Define the URL of the application server
|
||||
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||
LIVEKIT_URL = environment.livekitUrl;
|
||||
// For local development, leave these variables empty
|
||||
// For production, configure them with correct URLs depending on your deployment
|
||||
APPLICATION_SERVER_URL = '';
|
||||
LIVEKIT_URL = '';
|
||||
|
||||
// Define the name of the room and initialize the token variable
|
||||
roomName = 'custom-participants-panel';
|
||||
@ -59,7 +60,30 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
constructor(
|
||||
private httpClient: HttpClient,
|
||||
private participantService: ParticipantService
|
||||
) {}
|
||||
) {
|
||||
this.configureUrls();
|
||||
}
|
||||
|
||||
private configureUrls() {
|
||||
// If APPLICATION_SERVER_URL is not configured, use default value from local development
|
||||
if (!this.APPLICATION_SERVER_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.APPLICATION_SERVER_URL = 'http://localhost:6080/';
|
||||
} else {
|
||||
this.APPLICATION_SERVER_URL =
|
||||
'https://' + window.location.hostname + ':6443/';
|
||||
}
|
||||
}
|
||||
|
||||
// If LIVEKIT_URL is not configured, use default value from local development
|
||||
if (!this.LIVEKIT_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.LIVEKIT_URL = 'ws://localhost:7880/';
|
||||
} else {
|
||||
this.LIVEKIT_URL = 'wss://' + window.location.hostname + ':7443/';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Subscribes to updates for local and remote participants.
|
||||
ngOnInit() {
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
applicationServerUrl: '',
|
||||
livekitUrl: '',
|
||||
};
|
||||
|
||||
@ -1,18 +1,3 @@
|
||||
// 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,
|
||||
applicationServerUrl: 'http://localhost:6080/',
|
||||
livekitUrl: 'http://localhost:7880/',
|
||||
};
|
||||
|
||||
/*
|
||||
* 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.
|
||||
|
||||
13692
openvidu-components/openvidu-custom-stream/package-lock.json
generated
13692
openvidu-components/openvidu-custom-stream/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,35 +1,35 @@
|
||||
{
|
||||
"name": "openvidu-custom-stream",
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"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": {
|
||||
"@angular/animations": "^18.0.1",
|
||||
"@angular/cdk": "^18.0.1",
|
||||
"@angular/common": "^18.0.1",
|
||||
"@angular/compiler": "^18.0.1",
|
||||
"@angular/core": "^18.0.1",
|
||||
"@angular/forms": "^18.0.1",
|
||||
"@angular/material": "^18.0.1",
|
||||
"@angular/platform-browser": "^18.0.1",
|
||||
"@angular/platform-browser-dynamic": "^18.0.1",
|
||||
"@angular/router": "^18.0.1",
|
||||
"openvidu-angular": "file:../openvidu-angular-3.0.0-dev.tgz",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/build": "^18.0.2",
|
||||
"@angular/cli": "^18.0.2",
|
||||
"@angular/compiler-cli": "^18.0.1",
|
||||
"@types/node": "^20.12.12",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
"name": "openvidu-custom-stream",
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve --port=5080 --host=0.0.0.0",
|
||||
"build": "ng build",
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"build:prod": "ng build --output-path ./openvidu-basic-node/public/ --configuration production"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^18.0.1",
|
||||
"@angular/cdk": "^18.0.1",
|
||||
"@angular/common": "^18.0.1",
|
||||
"@angular/compiler": "^18.0.1",
|
||||
"@angular/core": "^18.0.1",
|
||||
"@angular/forms": "^18.0.1",
|
||||
"@angular/material": "^18.0.1",
|
||||
"@angular/platform-browser": "^18.0.1",
|
||||
"@angular/platform-browser-dynamic": "^18.0.1",
|
||||
"@angular/router": "^18.0.1",
|
||||
"openvidu-angular": "file:../openvidu-angular-3.0.0-dev.tgz",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/build": "^18.0.2",
|
||||
"@angular/cli": "^18.0.2",
|
||||
"@angular/compiler-cli": "^18.0.1",
|
||||
"@types/node": "^20.12.12",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
}
|
||||
@ -2,7 +2,6 @@ import { HttpClient } from '@angular/common/http';
|
||||
import { Component } from '@angular/core';
|
||||
import { lastValueFrom } from 'rxjs';
|
||||
|
||||
import { environment } from 'src/environments/environment';
|
||||
import {
|
||||
OpenViduAngularModule,
|
||||
ApiDirectiveModule,
|
||||
@ -37,15 +36,39 @@ import {
|
||||
],
|
||||
})
|
||||
export class AppComponent {
|
||||
// Define the URL of the application server
|
||||
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||
LIVEKIT_URL = environment.livekitUrl;
|
||||
// For local development, leave these variables empty
|
||||
// For production, configure them with correct URLs depending on your deployment
|
||||
APPLICATION_SERVER_URL = '';
|
||||
LIVEKIT_URL = '';
|
||||
|
||||
// Define the name of the room and initialize the token variable
|
||||
roomName = 'custom-stream';
|
||||
token!: string;
|
||||
|
||||
constructor(private httpClient: HttpClient) {}
|
||||
constructor(private httpClient: HttpClient) {
|
||||
this.configureUrls();
|
||||
}
|
||||
|
||||
private configureUrls() {
|
||||
// If APPLICATION_SERVER_URL is not configured, use default value from local development
|
||||
if (!this.APPLICATION_SERVER_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.APPLICATION_SERVER_URL = 'http://localhost:6080/';
|
||||
} else {
|
||||
this.APPLICATION_SERVER_URL =
|
||||
'https://' + window.location.hostname + ':6443/';
|
||||
}
|
||||
}
|
||||
|
||||
// If LIVEKIT_URL is not configured, use default value from local development
|
||||
if (!this.LIVEKIT_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.LIVEKIT_URL = 'ws://localhost:7880/';
|
||||
} else {
|
||||
this.LIVEKIT_URL = 'wss://' + window.location.hostname + ':7443/';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Function to request a token when a participant joins the room
|
||||
async onTokenRequested(participantName: string) {
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
applicationServerUrl: '',
|
||||
livekitUrl: '',
|
||||
};
|
||||
|
||||
@ -1,18 +1,3 @@
|
||||
// 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,
|
||||
applicationServerUrl: 'http://localhost:6080/',
|
||||
livekitUrl: 'http://localhost:7880/',
|
||||
};
|
||||
|
||||
/*
|
||||
* 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.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -3,10 +3,10 @@
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"start": "ng serve --port=5080 --host=0.0.0.0",
|
||||
"build": "ng build",
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"build:prod": "./node_modules/@angular/cli/bin/ng.js build --output-path ./openvidu-basic-node/public/ --configuration production"
|
||||
"build:prod": "ng build --output-path ./openvidu-basic-node/public/ --configuration production"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
|
||||
@ -32,9 +32,11 @@ import { environment } from 'src/environments/environment';
|
||||
],
|
||||
})
|
||||
export class AppComponent {
|
||||
// The URL of the application server.
|
||||
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||
LIVEKIT_URL = environment.livekitUrl;
|
||||
// For local development, leave these variables empty
|
||||
// For production, configure them with correct URLs depending on your deployment
|
||||
|
||||
APPLICATION_SERVER_URL = '';
|
||||
LIVEKIT_URL = '';
|
||||
// The name of the room.
|
||||
roomName = 'custom-toolbar';
|
||||
|
||||
@ -44,7 +46,30 @@ export class AppComponent {
|
||||
constructor(
|
||||
private httpClient: HttpClient,
|
||||
private participantService: ParticipantService
|
||||
) {}
|
||||
) {
|
||||
this.configureUrls();
|
||||
}
|
||||
|
||||
private configureUrls() {
|
||||
// If APPLICATION_SERVER_URL is not configured, use default value from local development
|
||||
if (!this.APPLICATION_SERVER_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.APPLICATION_SERVER_URL = 'http://localhost:6080/';
|
||||
} else {
|
||||
this.APPLICATION_SERVER_URL =
|
||||
'https://' + window.location.hostname + ':6443/';
|
||||
}
|
||||
}
|
||||
|
||||
// If LIVEKIT_URL is not configured, use default value from local development
|
||||
if (!this.LIVEKIT_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.LIVEKIT_URL = 'ws://localhost:7880/';
|
||||
} else {
|
||||
this.LIVEKIT_URL = 'wss://' + window.location.hostname + ':7443/';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Called when a token is requested for a participant.
|
||||
async onTokenRequested(participantName: string) {
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
applicationServerUrl: '',
|
||||
livekitUrl: '',
|
||||
production: true,
|
||||
};
|
||||
|
||||
@ -1,18 +1,3 @@
|
||||
// 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,
|
||||
applicationServerUrl: 'http://localhost:6080/',
|
||||
livekitUrl: 'http://localhost:7880/',
|
||||
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.
|
||||
|
||||
848
openvidu-components/openvidu-custom-ui/package-lock.json
generated
848
openvidu-components/openvidu-custom-ui/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -3,10 +3,10 @@
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"start": "ng serve --port=5080 --host=0.0.0.0",
|
||||
"build": "ng build",
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"build:prod": "./node_modules/@angular/cli/bin/ng.js build --output-path ./openvidu-basic-node/public/ --configuration production"
|
||||
"build:prod": "ng build --output-path ./openvidu-basic-node/public/ --configuration production"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
|
||||
@ -2,7 +2,6 @@ import { HttpClient } from '@angular/common/http';
|
||||
import { Component } from '@angular/core';
|
||||
import { lastValueFrom } from 'rxjs';
|
||||
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { OpenViduAngularModule, ApiDirectiveModule } from 'openvidu-angular';
|
||||
|
||||
@Component({
|
||||
@ -14,9 +13,11 @@ import { OpenViduAngularModule, ApiDirectiveModule } from 'openvidu-angular';
|
||||
imports: [OpenViduAngularModule, ApiDirectiveModule],
|
||||
})
|
||||
export class AppComponent {
|
||||
// The URL of the application server.
|
||||
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||
LIVEKIT_URL = environment.livekitUrl;
|
||||
// For local development, leave these variables empty
|
||||
// For production, configure them with correct URLs depending on your deployment
|
||||
|
||||
APPLICATION_SERVER_URL = '';
|
||||
LIVEKIT_URL = '';
|
||||
|
||||
// The name of the room to join.
|
||||
roomName = 'openvidu-custom-ui';
|
||||
@ -25,7 +26,30 @@ export class AppComponent {
|
||||
token!: string;
|
||||
|
||||
// Creates a new instance of the AppComponent class.
|
||||
constructor(private httpClient: HttpClient) {}
|
||||
constructor(private httpClient: HttpClient) {
|
||||
this.configureUrls();
|
||||
}
|
||||
|
||||
private configureUrls() {
|
||||
// If APPLICATION_SERVER_URL is not configured, use default value from local development
|
||||
if (!this.APPLICATION_SERVER_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.APPLICATION_SERVER_URL = 'http://localhost:6080/';
|
||||
} else {
|
||||
this.APPLICATION_SERVER_URL =
|
||||
'https://' + window.location.hostname + ':6443/';
|
||||
}
|
||||
}
|
||||
|
||||
// If LIVEKIT_URL is not configured, use default value from local development
|
||||
if (!this.LIVEKIT_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.LIVEKIT_URL = 'ws://localhost:7880/';
|
||||
} else {
|
||||
this.LIVEKIT_URL = 'wss://' + window.location.hostname + ':7443/';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Requests a token to join the room with the given participant name.
|
||||
async onTokenRequested(participantName: string) {
|
||||
|
||||
@ -0,0 +1,55 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Component } from '@angular/core';
|
||||
import { lastValueFrom } from 'rxjs';
|
||||
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { OpenViduAngularModule, ApiDirectiveModule } from 'openvidu-angular';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
template:
|
||||
'<ov-videoconference [token]="token" [livekitUrl]="LIVEKIT_URL" (onTokenRequested)="onTokenRequested($event)"></ov-videoconference>',
|
||||
styles: [''],
|
||||
standalone: true,
|
||||
imports: [OpenViduAngularModule, ApiDirectiveModule],
|
||||
})
|
||||
export class AppComponent {
|
||||
// The URL of the application server.
|
||||
APPLICATION_SERVER_URL = '';
|
||||
LIVEKIT_URL = environment.livekitUrl;
|
||||
|
||||
// The name of the room to join.
|
||||
roomName = 'openvidu-custom-ui';
|
||||
|
||||
// The token used to join the room.
|
||||
token!: string;
|
||||
|
||||
// Creates a new instance of the AppComponent class.
|
||||
constructor(private httpClient: HttpClient) {}
|
||||
|
||||
// Requests a token to join the room with the given participant name.
|
||||
async onTokenRequested(participantName: string) {
|
||||
const { token } = await this.getToken(this.roomName, participantName);
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
// Retrieves a token to join the room with the given name and participant name.
|
||||
getToken(roomName: string, participantName: string): Promise<any> {
|
||||
try {
|
||||
return lastValueFrom(
|
||||
this.httpClient.post<any>(this.APPLICATION_SERVER_URL + 'token', {
|
||||
roomName,
|
||||
participantName,
|
||||
})
|
||||
);
|
||||
} catch (error: any) {
|
||||
if (error.status === 404) {
|
||||
throw {
|
||||
status: error.status,
|
||||
message: 'Cannot connect with backend. ' + error.url + ' not found',
|
||||
};
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,3 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
applicationServerUrl: '',
|
||||
livekitUrl: '',
|
||||
production: true,
|
||||
};
|
||||
|
||||
@ -1,18 +1,3 @@
|
||||
// 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,
|
||||
applicationServerUrl: 'http://localhost:6080/',
|
||||
livekitUrl: 'http://localhost:7880/',
|
||||
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.
|
||||
|
||||
26792
openvidu-components/openvidu-toggle-hand/package-lock.json
generated
26792
openvidu-components/openvidu-toggle-hand/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,37 +1,36 @@
|
||||
{
|
||||
"name": "openvidu-toggle-hand",
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve --configuration development",
|
||||
"build": "ng build",
|
||||
"build:prod": "./node_modules/@angular/cli/bin/ng.js build --output-path ./openvidu-basic-node/public/ --configuration production"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "18.0.1",
|
||||
"@angular/cdk": "18.0.1",
|
||||
"@angular/common": "18.0.1",
|
||||
"@angular/compiler": "18.0.1",
|
||||
"@angular/core": "18.0.1",
|
||||
"@angular/forms": "18.0.1",
|
||||
"@angular/material": "18.0.1",
|
||||
"@angular/platform-browser": "18.0.1",
|
||||
"@angular/platform-browser-dynamic": "18.0.1",
|
||||
"@angular/router": "18.0.1",
|
||||
"openvidu-angular": "file:../openvidu-angular-3.0.0-dev.tgz",
|
||||
"rxjs": "7.5.2",
|
||||
"tslib": "2.0.0",
|
||||
"zone.js": "0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "18.0.2",
|
||||
"@angular/cli": "18.0.2",
|
||||
"@angular/compiler-cli": "18.0.1",
|
||||
"@types/node": "^20.12.12",
|
||||
"codelyzer": "^6.0.0",
|
||||
"ts-node": "~8.3.0",
|
||||
"tslint": "~6.1.0",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
"name": "openvidu-toggle-hand",
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"start": "ng serve --port=5080 --host=0.0.0.0",
|
||||
"build": "ng build",
|
||||
"build:prod": "ng build --output-path ./openvidu-basic-node/public/ --configuration production"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "18.0.1",
|
||||
"@angular/cdk": "18.0.1",
|
||||
"@angular/common": "18.0.1",
|
||||
"@angular/compiler": "18.0.1",
|
||||
"@angular/core": "18.0.1",
|
||||
"@angular/forms": "18.0.1",
|
||||
"@angular/material": "18.0.1",
|
||||
"@angular/platform-browser": "18.0.1",
|
||||
"@angular/platform-browser-dynamic": "18.0.1",
|
||||
"@angular/router": "18.0.1",
|
||||
"openvidu-angular": "file:../openvidu-angular-3.0.0-dev.tgz",
|
||||
"rxjs": "7.5.2",
|
||||
"tslib": "2.0.0",
|
||||
"zone.js": "0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "18.0.2",
|
||||
"@angular/cli": "18.0.2",
|
||||
"@angular/compiler-cli": "18.0.1",
|
||||
"@types/node": "^20.12.12",
|
||||
"codelyzer": "^6.0.0",
|
||||
"ts-node": "~8.3.0",
|
||||
"tslint": "~6.1.0",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
}
|
||||
@ -45,9 +45,11 @@ enum DataTopicApp {
|
||||
imports: [OpenViduAngularModule, ApiDirectiveModule, OpenViduAngularDirectiveModule, MatIconButton, MatIcon]
|
||||
})
|
||||
export class AppComponent {
|
||||
// The URL of the application server.
|
||||
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||
LIVEKIT_URL = environment.livekitUrl;
|
||||
// For local development, leave these variables empty
|
||||
// For production, configure them with correct URLs depending on your deployment
|
||||
|
||||
APPLICATION_SERVER_URL = '';
|
||||
LIVEKIT_URL = '';
|
||||
|
||||
// The token used to connect to the OpenVidu session.
|
||||
token!: string;
|
||||
@ -58,7 +60,29 @@ export class AppComponent {
|
||||
// The name of the OpenVidu room.
|
||||
private roomName = 'openvidu-toggle-hand';
|
||||
|
||||
constructor(private httpClient: HttpClient, private participantService: ParticipantService) {}
|
||||
constructor(private httpClient: HttpClient, private participantService: ParticipantService) {
|
||||
this.configureUrls();
|
||||
}
|
||||
|
||||
private configureUrls() {
|
||||
// If APPLICATION_SERVER_URL is not configured, use default value from local development
|
||||
if (!this.APPLICATION_SERVER_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.APPLICATION_SERVER_URL = 'http://localhost:6080/';
|
||||
} else {
|
||||
this.APPLICATION_SERVER_URL = 'https://' + window.location.hostname + ':6443/';
|
||||
}
|
||||
}
|
||||
|
||||
// If LIVEKIT_URL is not configured, use default value from local development
|
||||
if (!this.LIVEKIT_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.LIVEKIT_URL = 'ws://localhost:7880/';
|
||||
} else {
|
||||
this.LIVEKIT_URL = 'wss://' + window.location.hostname + ':7443/';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Requests a token from the application server for the given participant name.
|
||||
async onTokenRequested(participantName: string) {
|
||||
|
||||
@ -0,0 +1,113 @@
|
||||
import { animate, style, transition, trigger } from '@angular/animations';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Component } from '@angular/core';
|
||||
import { lastValueFrom } from 'rxjs';
|
||||
|
||||
import {
|
||||
DataPacket_Kind,
|
||||
DataPublishOptions,
|
||||
ParticipantService,
|
||||
RemoteParticipant,
|
||||
Room,
|
||||
RoomEvent,
|
||||
OpenViduAngularModule,
|
||||
ApiDirectiveModule,
|
||||
OpenViduAngularDirectiveModule
|
||||
} from 'openvidu-angular';
|
||||
import { ParticipantAppModel } from './models/participant-app.model';
|
||||
|
||||
import { environment } from 'src/environments/environment';
|
||||
|
||||
import { MatIcon } from '@angular/material/icon';
|
||||
import { MatIconButton } from '@angular/material/button';
|
||||
|
||||
enum DataTopicApp {
|
||||
HAND_TOGGLE = 'handToggle'
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
templateUrl: './app.component.html',
|
||||
styleUrls: ['./app.component.css'],
|
||||
animations: [
|
||||
trigger('inOutHandAnimation', [
|
||||
transition(':enter', [
|
||||
style({ opacity: 0, transform: 'translateY(-100%)' }),
|
||||
animate('300ms ease-in-out', style({ opacity: 1, transform: 'translateY(0)' }))
|
||||
]),
|
||||
transition(':leave', [
|
||||
style({ opacity: 1, transform: 'translateY(0)' }),
|
||||
animate('300ms ease-in-out', style({ opacity: 0, transform: 'translateY(-100%)' }))
|
||||
])
|
||||
])
|
||||
],
|
||||
standalone: true,
|
||||
imports: [OpenViduAngularModule, ApiDirectiveModule, OpenViduAngularDirectiveModule, MatIconButton, MatIcon]
|
||||
})
|
||||
export class AppComponent {
|
||||
// The URL of the application server.
|
||||
APPLICATION_SERVER_URL = '';
|
||||
LIVEKIT_URL = environment.livekitUrl;
|
||||
|
||||
// The token used to connect to the OpenVidu session.
|
||||
token!: string;
|
||||
|
||||
// Whether the local participant has raised their hand.
|
||||
hasHandRaised: boolean = false;
|
||||
|
||||
// The name of the OpenVidu room.
|
||||
private roomName = 'openvidu-toggle-hand';
|
||||
|
||||
constructor(private httpClient: HttpClient, private participantService: ParticipantService) {}
|
||||
|
||||
// Requests a token from the application server for the given participant name.
|
||||
async onTokenRequested(participantName: string) {
|
||||
const { token } = await this.getToken(this.roomName, participantName);
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
// Handles the reception of a remote hand-raising event.
|
||||
handleRemoteHand(room: Room) {
|
||||
// Subscribe to hand toggling events from other participants
|
||||
room.on(RoomEvent.DataReceived, (payload: Uint8Array, participant?: RemoteParticipant, _?: DataPacket_Kind, topic?: string) => {
|
||||
if (topic === DataTopicApp.HAND_TOGGLE) {
|
||||
const p = this.participantService.getRemoteParticipantBySid(participant.sid);
|
||||
if (p) {
|
||||
(<ParticipantAppModel>p).toggleHandRaised();
|
||||
}
|
||||
this.participantService.updateRemoteParticipants();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Handles the local hand-raising event.
|
||||
async handleLocalHand() {
|
||||
// Get local participant with ParticipantService
|
||||
const participant = <ParticipantAppModel>this.participantService.getLocalParticipant();
|
||||
|
||||
// Toggle the participant hand with the method we wil add in our ParticipantAppModel
|
||||
participant.toggleHandRaised();
|
||||
|
||||
// Refresh the local participant object for others component and services
|
||||
this.participantService.updateLocalParticipant();
|
||||
|
||||
// Send a signal with the new value to others participant using the openvidu-browser signal
|
||||
const strData = JSON.stringify({});
|
||||
const data: Uint8Array = new TextEncoder().encode(strData);
|
||||
const options: DataPublishOptions = { topic: DataTopicApp.HAND_TOGGLE };
|
||||
|
||||
await this.participantService.publishData(data, options);
|
||||
}
|
||||
|
||||
// Requests a token from the application server for the given room and participant names.
|
||||
getToken(roomName: string, participantName: string): Promise<any> {
|
||||
try {
|
||||
return lastValueFrom(this.httpClient.post<any>(this.APPLICATION_SERVER_URL + 'token', { roomName, participantName }));
|
||||
} catch (error: any) {
|
||||
if (error.status === 404) {
|
||||
throw { status: error.status, message: 'Cannot connect with backend. ' + error.url + ' not found' };
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,3 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
applicationServerUrl: '',
|
||||
livekitUrl: ''
|
||||
};
|
||||
|
||||
@ -1,18 +1,3 @@
|
||||
// This file can be replaced during build by using the `fileReplacements` array.
|
||||
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
|
||||
// The list of file replacements can be found in `angular.json`.
|
||||
|
||||
export const environment = {
|
||||
production: false,
|
||||
applicationServerUrl: 'http://localhost:6080/',
|
||||
livekitUrl: 'http://localhost:7880/'
|
||||
};
|
||||
|
||||
/*
|
||||
* 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/dist/zone-error'; // Included with Angular CLI.
|
||||
|
||||
13692
openvidu-components/openvidu-toolbar-buttons/package-lock.json
generated
13692
openvidu-components/openvidu-toolbar-buttons/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,35 +1,34 @@
|
||||
{
|
||||
"name": "openvidu-toolbar-buttons",
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"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": {
|
||||
"@angular/animations": "^18.0.1",
|
||||
"@angular/cdk": "^18.0.1",
|
||||
"@angular/common": "^18.0.1",
|
||||
"@angular/compiler": "^18.0.1",
|
||||
"@angular/core": "^18.0.1",
|
||||
"@angular/forms": "^18.0.1",
|
||||
"@angular/material": "^18.0.1",
|
||||
"@angular/platform-browser": "^18.0.1",
|
||||
"@angular/platform-browser-dynamic": "^18.0.1",
|
||||
"@angular/router": "^18.0.1",
|
||||
"openvidu-angular": "file:../openvidu-angular-3.0.0-dev.tgz",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/build": "^18.0.2",
|
||||
"@angular/cli": "^18.0.2",
|
||||
"@angular/compiler-cli": "^18.0.1",
|
||||
"@types/node": "^20.12.12",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
"name": "openvidu-toolbar-buttons",
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"start": "ng serve --port=5080 --host=0.0.0.0",
|
||||
"build": "ng build",
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"build:prod": "ng build --output-path ./openvidu-basic-node/public/ --configuration production"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^18.0.1",
|
||||
"@angular/cdk": "^18.0.1",
|
||||
"@angular/common": "^18.0.1",
|
||||
"@angular/compiler": "^18.0.1",
|
||||
"@angular/core": "^18.0.1",
|
||||
"@angular/forms": "^18.0.1",
|
||||
"@angular/material": "^18.0.1",
|
||||
"@angular/platform-browser": "^18.0.1",
|
||||
"@angular/platform-browser-dynamic": "^18.0.1",
|
||||
"@angular/router": "^18.0.1",
|
||||
"openvidu-angular": "file:../openvidu-angular-3.0.0-dev.tgz",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/build": "^18.0.2",
|
||||
"@angular/cli": "^18.0.2",
|
||||
"@angular/compiler-cli": "^18.0.1",
|
||||
"@types/node": "^20.12.12",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
}
|
||||
@ -41,9 +41,11 @@ import { MatIconButton } from '@angular/material/button';
|
||||
],
|
||||
})
|
||||
export class AppComponent {
|
||||
// The URL of the application server.
|
||||
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||
LIVEKIT_URL = environment.livekitUrl;
|
||||
// For local development, leave these variables empty
|
||||
// For production, configure them with correct URLs depending on your deployment
|
||||
|
||||
APPLICATION_SERVER_URL = '';
|
||||
LIVEKIT_URL = '';
|
||||
|
||||
// The name of the room for the video conference.
|
||||
roomName = 'toolbar-additionalbtn';
|
||||
@ -54,7 +56,30 @@ export class AppComponent {
|
||||
constructor(
|
||||
private httpClient: HttpClient,
|
||||
private participantService: ParticipantService
|
||||
) {}
|
||||
) {
|
||||
this.configureUrls();
|
||||
}
|
||||
|
||||
private configureUrls() {
|
||||
// If APPLICATION_SERVER_URL is not configured, use default value from local development
|
||||
if (!this.APPLICATION_SERVER_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.APPLICATION_SERVER_URL = 'http://localhost:6080/';
|
||||
} else {
|
||||
this.APPLICATION_SERVER_URL =
|
||||
'https://' + window.location.hostname + ':6443/';
|
||||
}
|
||||
}
|
||||
|
||||
// If LIVEKIT_URL is not configured, use default value from local development
|
||||
if (!this.LIVEKIT_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.LIVEKIT_URL = 'ws://localhost:7880/';
|
||||
} else {
|
||||
this.LIVEKIT_URL = 'wss://' + window.location.hostname + ':7443/';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Called when the token is requested.
|
||||
async onTokenRequested(participantName: string) {
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
applicationServerUrl: '',
|
||||
livekitUrl: '',
|
||||
};
|
||||
|
||||
@ -1,18 +1,3 @@
|
||||
// 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,
|
||||
applicationServerUrl: 'http://localhost:6080/',
|
||||
livekitUrl: 'http://localhost:7880/',
|
||||
};
|
||||
|
||||
/*
|
||||
* 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.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,35 +1,34 @@
|
||||
{
|
||||
"name": "openvidu-toolbar-panel-buttons",
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"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": {
|
||||
"@angular/animations": "^18.0.1",
|
||||
"@angular/cdk": "^18.0.1",
|
||||
"@angular/common": "^18.0.1",
|
||||
"@angular/compiler": "^18.0.1",
|
||||
"@angular/core": "^18.0.1",
|
||||
"@angular/forms": "^18.0.1",
|
||||
"@angular/material": "^18.0.1",
|
||||
"@angular/platform-browser": "^18.0.1",
|
||||
"@angular/platform-browser-dynamic": "^18.0.1",
|
||||
"@angular/router": "^18.0.1",
|
||||
"openvidu-angular": "file:../openvidu-angular-3.0.0-dev.tgz",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/build": "^18.0.2",
|
||||
"@angular/cli": "^18.0.2",
|
||||
"@angular/compiler-cli": "^18.0.1",
|
||||
"@types/node": "^20.12.12",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
"name": "openvidu-toolbar-panel-buttons",
|
||||
"version": "2.27.0",
|
||||
"scripts": {
|
||||
"start": "ng serve --port=5080 --host=0.0.0.0",
|
||||
"build": "ng build",
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"build:prod": "ng build --output-path ./openvidu-basic-node/public/ --configuration production"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^18.0.1",
|
||||
"@angular/cdk": "^18.0.1",
|
||||
"@angular/common": "^18.0.1",
|
||||
"@angular/compiler": "^18.0.1",
|
||||
"@angular/core": "^18.0.1",
|
||||
"@angular/forms": "^18.0.1",
|
||||
"@angular/material": "^18.0.1",
|
||||
"@angular/platform-browser": "^18.0.1",
|
||||
"@angular/platform-browser-dynamic": "^18.0.1",
|
||||
"@angular/router": "^18.0.1",
|
||||
"openvidu-angular": "file:../openvidu-angular-3.0.0-dev.tgz",
|
||||
"rxjs": "~7.5.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.14.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/build": "^18.0.2",
|
||||
"@angular/cli": "^18.0.2",
|
||||
"@angular/compiler-cli": "^18.0.1",
|
||||
"@types/node": "^20.12.12",
|
||||
"typescript": "^5.4.5"
|
||||
}
|
||||
}
|
||||
@ -14,7 +14,7 @@ import {
|
||||
template: `
|
||||
<ov-videoconference
|
||||
[token]="token"
|
||||
[livekitUrl]="LIVEKIT_URL"
|
||||
[livekitUrl]="LIVEKIT_URL"
|
||||
[toolbarDisplayRoomName]="false"
|
||||
(onTokenRequested)="onTokenRequested($event)"
|
||||
>
|
||||
@ -32,9 +32,11 @@ import {
|
||||
],
|
||||
})
|
||||
export class AppComponent {
|
||||
// Set the application server URL from the environment variables
|
||||
APPLICATION_SERVER_URL = environment.applicationServerUrl;
|
||||
LIVEKIT_URL = environment.livekitUrl;
|
||||
// For local development, leave these variables empty
|
||||
// For production, configure them with correct URLs depending on your deployment
|
||||
|
||||
APPLICATION_SERVER_URL = '';
|
||||
LIVEKIT_URL = '';
|
||||
|
||||
// Set the room name
|
||||
roomName = 'toolbar-additional-panel-btn';
|
||||
@ -42,7 +44,30 @@ export class AppComponent {
|
||||
// Initialize the token variable
|
||||
token!: string;
|
||||
|
||||
constructor(private httpClient: HttpClient) {}
|
||||
constructor(private httpClient: HttpClient) {
|
||||
this.configureUrls();
|
||||
}
|
||||
|
||||
private configureUrls() {
|
||||
// If APPLICATION_SERVER_URL is not configured, use default value from local development
|
||||
if (!this.APPLICATION_SERVER_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.APPLICATION_SERVER_URL = 'http://localhost:6080/';
|
||||
} else {
|
||||
this.APPLICATION_SERVER_URL =
|
||||
'https://' + window.location.hostname + ':6443/';
|
||||
}
|
||||
}
|
||||
|
||||
// If LIVEKIT_URL is not configured, use default value from local development
|
||||
if (!this.LIVEKIT_URL) {
|
||||
if (window.location.hostname === 'localhost') {
|
||||
this.LIVEKIT_URL = 'ws://localhost:7880/';
|
||||
} else {
|
||||
this.LIVEKIT_URL = 'wss://' + window.location.hostname + ':7443/';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Method to request a token for a participant
|
||||
async onTokenRequested(participantName: string) {
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
applicationServerUrl: '',
|
||||
livekitUrl: '',
|
||||
};
|
||||
|
||||
@ -1,18 +1,3 @@
|
||||
// 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,
|
||||
applicationServerUrl: 'http://localhost:6080/',
|
||||
livekitUrl: 'http://localhost:7880/',
|
||||
};
|
||||
|
||||
/*
|
||||
* 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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user