openvidu-browser: modify isPro with isAtLeastPro

pull/713/head
pabloFuente 2022-04-06 20:02:22 +02:00
parent 41f53b9895
commit 8457592c0b
4 changed files with 5 additions and 5 deletions

View File

@ -132,7 +132,7 @@ export class OpenVidu {
/** /**
* @hidden * @hidden
*/ */
isPro: boolean = false; isAtLeastPro: boolean = false;
/** /**
* @hidden * @hidden
*/ */

View File

@ -1500,7 +1500,7 @@ export class Session extends EventDispatcher {
if (!!sendBrowserLogs) { if (!!sendBrowserLogs) {
this.openvidu.sendBrowserLogs = sendBrowserLogs; this.openvidu.sendBrowserLogs = sendBrowserLogs;
} }
this.openvidu.isPro = !!webrtcStatsInterval && !!sendBrowserLogs; this.openvidu.isAtLeastPro = !!webrtcStatsInterval && !!sendBrowserLogs;
this.openvidu.isEnterprise = edition === 'enterprise'; this.openvidu.isEnterprise = edition === 'enterprise';
this.openvidu.wsUri = 'wss://' + url.host + '/openvidu'; this.openvidu.wsUri = 'wss://' + url.host + '/openvidu';

View File

@ -343,8 +343,8 @@ export class Stream {
if (!this.session.openvidu.httpUri) { if (!this.session.openvidu.httpUri) {
return reject(this.session.notConnectedError()); return reject(this.session.notConnectedError());
} }
if (!this.session.openvidu.isEnterprise) { if (!this.session.openvidu.isAtLeastPro) {
return reject(new OpenViduError(OpenViduErrorName.OPENVIDU_EDITION_NOT_SUPPORTED, 'OpenVidu Virtual Background API is part of OpenVidu Enterprise edition')); return reject(new OpenViduError(OpenViduErrorName.OPENVIDU_EDITION_NOT_SUPPORTED, 'OpenVidu Virtual Background API is available from OpenVidu Pro edition onwards'));
} }
if (!this.hasVideo) { if (!this.hasVideo) {
return reject(new OpenViduError(OpenViduErrorName.NO_VIDEO_TRACK, 'The Virtual Background filter requires a video track to be applied')); return reject(new OpenViduError(OpenViduErrorName.NO_VIDEO_TRACK, 'The Virtual Background filter requires a video track to be applied'));

View File

@ -31,7 +31,7 @@ export class OpenViduLogger {
// If dev mode or... // If dev mode or...
if ((window['LOG_JSNLOG_RESULTS']) || if ((window['LOG_JSNLOG_RESULTS']) ||
// If instance is created and it is OpenVidu Pro // If instance is created and it is OpenVidu Pro
(this.instance && openVidu.isPro (this.instance && openVidu.isAtLeastPro
// If logs are enabled // If logs are enabled
&& this.instance.isOpenViduBrowserLogsDebugActive(openVidu) && this.instance.isOpenViduBrowserLogsDebugActive(openVidu)
// Only reconfigure it if session or finalUserId has changed // Only reconfigure it if session or finalUserId has changed