From ce488b2884810c7f2f3c95fdd35d1cb615452cde Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Tue, 8 Sep 2020 17:56:53 +0200 Subject: [PATCH] openvidu-browser: store openvidu-server version in OpenVidu object --- openvidu-browser/src/OpenVidu/OpenVidu.ts | 4 ++++ openvidu-browser/src/OpenVidu/Session.ts | 1 + openvidu-browser/src/OpenVidu/Stream.ts | 6 +++--- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/openvidu-browser/src/OpenVidu/OpenVidu.ts b/openvidu-browser/src/OpenVidu/OpenVidu.ts index 312bd7f7..8b00d977 100644 --- a/openvidu-browser/src/OpenVidu/OpenVidu.ts +++ b/openvidu-browser/src/OpenVidu/OpenVidu.ts @@ -111,6 +111,10 @@ export class OpenVidu { * @hidden */ libraryVersion: string; + /** + * @hidden + */ + openviduServerVersion: string; /** * @hidden */ diff --git a/openvidu-browser/src/OpenVidu/Session.ts b/openvidu-browser/src/OpenVidu/Session.ts index a02f8c1c..8c3efe6f 100644 --- a/openvidu-browser/src/OpenVidu/Session.ts +++ b/openvidu-browser/src/OpenVidu/Session.ts @@ -1279,6 +1279,7 @@ export class Session extends EventDispatcher { this.openvidu.wsUri = 'wss://' + url.host + '/openvidu'; this.openvidu.httpUri = 'https://' + url.host; + this.openvidu.openviduServerVersion = openviduServerVersion; } else { logger.error('Token "' + token + '" is not valid') diff --git a/openvidu-browser/src/OpenVidu/Stream.ts b/openvidu-browser/src/OpenVidu/Stream.ts index 832a03e1..bb06f680 100644 --- a/openvidu-browser/src/OpenVidu/Stream.ts +++ b/openvidu-browser/src/OpenVidu/Stream.ts @@ -1022,7 +1022,7 @@ export class Stream extends EventDispatcher { } } - private initHarkEvents(): void { + protected initHarkEvents(): void { if (!!this.mediaStream.getAudioTracks()[0]) { // Hark events can only be set if audio track is available if (this.streamManager.remote) { @@ -1050,7 +1050,7 @@ export class Stream extends EventDispatcher { } } - private initWebRtcStats(): void { + protected initWebRtcStats(): void { this.webRtcStats = new WebRtcStats(this); this.webRtcStats.initWebRtcStats(); @@ -1078,7 +1078,7 @@ export class Stream extends EventDispatcher { } } - private getIceServersConf(): RTCIceServer[] | undefined { + protected getIceServersConf(): RTCIceServer[] | undefined { let returnValue; if (!!this.session.openvidu.advancedConfiguration.iceServers) { returnValue = this.session.openvidu.advancedConfiguration.iceServers === 'freeice' ?