mirror of https://github.com/OpenVidu/openvidu.git
openvidu-browser: retrieve webrtcStatsInterval value from token
parent
182422f09f
commit
e3a2574852
|
@ -68,19 +68,11 @@ export class Connection {
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
constructor(private session: Session, opts?: ConnectionOptions) {
|
constructor(private session: Session, opts?: ConnectionOptions) {
|
||||||
|
|
||||||
let msg = "'Connection' created ";
|
let msg = "'Connection' created ";
|
||||||
if (!!opts) {
|
|
||||||
msg += "(remote) with 'connectionId' [" + opts.id + ']';
|
|
||||||
} else {
|
|
||||||
msg += '(local)';
|
|
||||||
}
|
|
||||||
console.info(msg);
|
|
||||||
|
|
||||||
this.options = opts;
|
|
||||||
|
|
||||||
if (!!opts) {
|
if (!!opts) {
|
||||||
// Connection is remote
|
// Connection is remote
|
||||||
|
msg += "(remote) with 'connectionId' [" + opts.id + ']';
|
||||||
|
this.options = opts;
|
||||||
this.connectionId = opts.id;
|
this.connectionId = opts.id;
|
||||||
this.creationTime = opts.createdAt;
|
this.creationTime = opts.createdAt;
|
||||||
if (opts.metadata) {
|
if (opts.metadata) {
|
||||||
|
@ -89,7 +81,11 @@ export class Connection {
|
||||||
if (opts.streams) {
|
if (opts.streams) {
|
||||||
this.initRemoteStreams(opts.streams);
|
this.initRemoteStreams(opts.streams);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// Connection is local
|
||||||
|
msg += '(local)';
|
||||||
}
|
}
|
||||||
|
console.info(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,10 @@ export class OpenVidu {
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
wsUri: string;
|
wsUri: string;
|
||||||
|
/**
|
||||||
|
* @hidden
|
||||||
|
*/
|
||||||
|
httpUri: string;
|
||||||
/**
|
/**
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
|
@ -73,6 +77,10 @@ export class OpenVidu {
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
advancedConfiguration: OpenViduAdvancedConfiguration = {};
|
advancedConfiguration: OpenViduAdvancedConfiguration = {};
|
||||||
|
/**
|
||||||
|
* @hidden
|
||||||
|
*/
|
||||||
|
webrtcStatsInterval: number = 0;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
console.info("'OpenVidu' initialized");
|
console.info("'OpenVidu' initialized");
|
||||||
|
|
|
@ -1144,6 +1144,7 @@ export class Session implements EventDispatcher {
|
||||||
const turnUsername = url.searchParams.get('turnUsername');
|
const turnUsername = url.searchParams.get('turnUsername');
|
||||||
const turnCredential = url.searchParams.get('turnCredential');
|
const turnCredential = url.searchParams.get('turnCredential');
|
||||||
const role = url.searchParams.get('role');
|
const role = url.searchParams.get('role');
|
||||||
|
const webrtcStatsInterval = url.searchParams.get('webrtcStatsInterval');
|
||||||
|
|
||||||
if (!!secret) {
|
if (!!secret) {
|
||||||
this.openvidu.secret = secret;
|
this.openvidu.secret = secret;
|
||||||
|
@ -1164,8 +1165,12 @@ export class Session implements EventDispatcher {
|
||||||
if (!!role) {
|
if (!!role) {
|
||||||
this.openvidu.role = role;
|
this.openvidu.role = role;
|
||||||
}
|
}
|
||||||
|
if (!!webrtcStatsInterval) {
|
||||||
|
this.openvidu.webrtcStatsInterval = +webrtcStatsInterval;
|
||||||
|
}
|
||||||
|
|
||||||
this.openvidu.wsUri = 'wss://' + url.host + '/openvidu';
|
this.openvidu.wsUri = 'wss://' + url.host + '/openvidu';
|
||||||
|
this.openvidu.httpUri = 'https://' + url.host;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue