2018-04-26 15:33:47 +02:00
"use strict" ;
/ *
2018-05-06 02:20:25 +02:00
* ( C ) Copyright 2017 - 2018 OpenVidu ( https : //openvidu.io/)
2018-04-26 15:33:47 +02:00
*
* Licensed under the Apache License , Version 2.0 ( the "License" ) ;
* you may not use this file except in compliance with the License .
* You may obtain a copy of the License at
*
* http : //www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing , software
* distributed under the License is distributed on an "AS IS" BASIS ,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express or implied .
* See the License for the specific language governing permissions and
* limitations under the License .
*
* /
exports . _ _esModule = true ;
2018-05-08 13:01:34 +02:00
var LocalRecorder _1 = require ( "./LocalRecorder" ) ;
var Publisher _1 = require ( "./Publisher" ) ;
var Session _1 = require ( "./Session" ) ;
2018-04-26 15:33:47 +02:00
var OpenViduError _1 = require ( "../OpenViduInternal/Enums/OpenViduError" ) ;
var VideoInsertMode _1 = require ( "../OpenViduInternal/Enums/VideoInsertMode" ) ;
var screenSharingAuto = require ( "../OpenViduInternal/ScreenSharing/Screen-Capturing-Auto" ) ;
var screenSharing = require ( "../OpenViduInternal/ScreenSharing/Screen-Capturing" ) ;
2018-06-04 14:33:57 +02:00
var RpcBuilder = require ( "../OpenViduInternal/KurentoUtils/kurento-jsonrpc" ) ;
2018-04-26 15:33:47 +02:00
var platform = require ( "platform" ) ;
/ * *
* Entrypoint of OpenVidu Browser library .
* Use it to initialize objects of type [ [ Session ] ] , [ [ Publisher ] ] and [ [ LocalRecorder ] ]
* /
var OpenVidu = /** @class */ ( function ( ) {
function OpenVidu ( ) {
2018-05-03 11:48:57 +02:00
/ * *
* @ hidden
* /
2018-04-26 15:33:47 +02:00
this . secret = '' ;
2018-05-03 11:48:57 +02:00
/ * *
* @ hidden
* /
2018-04-26 15:33:47 +02:00
this . recorder = false ;
/ * *
* @ hidden
* /
this . advancedConfiguration = { } ;
console . info ( "'OpenVidu' initialized" ) ;
}
/ * *
2018-05-08 10:40:46 +02:00
* Returns new session
2018-04-26 15:33:47 +02:00
* /
2018-05-08 10:40:46 +02:00
OpenVidu . prototype . initSession = function ( ) {
2018-05-08 13:01:34 +02:00
this . session = new Session _1 . Session ( this ) ;
2018-04-26 15:33:47 +02:00
return this . session ;
} ;
/ * *
* Returns a new publisher
*
* # # # # Events dispatched
*
* The [ [ Publisher ] ] object will dispatch an ` accessDialogOpened ` event , only if the pop - up shown by the browser to request permissions for the camera is opened . You can use this event to alert the user about granting permissions
* for your website . An ` accessDialogClosed ` event will also be dispatched after user clicks on "Allow" or "Block" in the pop - up .
*
* The [ [ Publisher ] ] object will dispatch an ` accessAllowed ` or ` accessDenied ` event once it has been granted access to the requested input devices or not .
*
2018-06-01 14:39:38 +02:00
* The [ [ Publisher ] ] object will dispatch a ` videoElementCreated ` event once a HTML video element has been added to DOM ( only if you
* [ let OpenVidu take care of the video players ] ( / d o c s / h o w - d o - i / m a n a g e - v i d e o s / # l e t - o p e n v i d u - t a k e - c a r e - o f - t h e - v i d e o - p l a y e r s ) ) . S e e [ [ V i d e o E l e m e n t E v e n t ] ] t o l e a r n m o r e .
2018-04-26 15:33:47 +02:00
*
2018-06-01 14:39:38 +02:00
* The [ [ Publisher ] ] object will dispatch a ` streamPlaying ` event once the local streams starts playing . See [ [ StreamManagerEvent ] ] to learn more .
2018-04-26 15:33:47 +02:00
*
2018-06-01 14:39:38 +02:00
* @ param targetElement HTML DOM element ( or its ` id ` attribute ) in which the video element of the Publisher will be inserted ( see [ [ PublisherProperties . insertMode ] ] ) . If * null * or * undefined * no default video will be created for this Publisher .
* You can always call method [ [ Publisher . addVideoElement ] ] or [ [ Publisher . createVideoElement ] ] to manage the video elements on your own ( see [ Manage video players ] ( / d o c s / h o w - d o - i / m a n a g e - v i d e o s ) s e c t i o n )
2018-04-26 15:33:47 +02:00
* @ param completionHandler ` error ` parameter is null if ` initPublisher ` succeeds , and is defined if it fails .
* ` completionHandler ` function is called before the Publisher dispatches an ` accessAllowed ` or an ` accessDenied ` event
* /
OpenVidu . prototype . initPublisher = function ( targetElement , param2 , param3 ) {
var properties ;
if ( ! ! param2 && ( typeof param2 !== 'function' ) ) {
// Matches 'initPublisher(targetElement, properties)' or 'initPublisher(targetElement, properties, completionHandler)'
properties = param2 ;
properties = {
audioSource : ( typeof properties . audioSource !== 'undefined' ) ? properties . audioSource : undefined ,
frameRate : this . isMediaStreamTrack ( properties . videoSource ) ? undefined : ( ( typeof properties . frameRate !== 'undefined' ) ? properties . frameRate : undefined ) ,
2018-04-27 11:08:03 +02:00
insertMode : ( typeof properties . insertMode !== 'undefined' ) ? ( ( typeof properties . insertMode === 'string' ) ? VideoInsertMode _1 . VideoInsertMode [ properties . insertMode ] : properties . insertMode ) : VideoInsertMode _1 . VideoInsertMode . APPEND ,
2018-04-26 15:33:47 +02:00
mirror : ( typeof properties . mirror !== 'undefined' ) ? properties . mirror : true ,
publishAudio : ( typeof properties . publishAudio !== 'undefined' ) ? properties . publishAudio : true ,
publishVideo : ( typeof properties . publishVideo !== 'undefined' ) ? properties . publishVideo : true ,
resolution : this . isMediaStreamTrack ( properties . videoSource ) ? undefined : ( ( typeof properties . resolution !== 'undefined' ) ? properties . resolution : '640x480' ) ,
videoSource : ( typeof properties . videoSource !== 'undefined' ) ? properties . videoSource : undefined
} ;
}
else {
// Matches 'initPublisher(targetElement)' or 'initPublisher(targetElement, completionHandler)'
properties = {
insertMode : VideoInsertMode _1 . VideoInsertMode . APPEND ,
mirror : true ,
publishAudio : true ,
publishVideo : true ,
resolution : '640x480'
} ;
}
2018-05-08 13:01:34 +02:00
var publisher = new Publisher _1 . Publisher ( targetElement , properties , this ) ;
2018-04-26 15:33:47 +02:00
var completionHandler ;
if ( ! ! param2 && ( typeof param2 === 'function' ) ) {
completionHandler = param2 ;
}
else if ( ! ! param3 ) {
completionHandler = param3 ;
}
publisher . initialize ( )
. then ( function ( ) {
if ( completionHandler !== undefined ) {
completionHandler ( undefined ) ;
}
publisher . emitEvent ( 'accessAllowed' , [ ] ) ;
} ) [ "catch" ] ( function ( error ) {
2018-06-01 14:39:38 +02:00
if ( completionHandler !== undefined ) {
2018-04-26 15:33:47 +02:00
completionHandler ( error ) ;
}
publisher . emitEvent ( 'accessDenied' , [ ] ) ;
} ) ;
return publisher ;
} ;
OpenVidu . prototype . initPublisherAsync = function ( targetElement , properties ) {
var _this = this ;
return new Promise ( function ( resolve , reject ) {
var publisher ;
var callback = function ( error ) {
if ( ! ! error ) {
reject ( error ) ;
}
else {
resolve ( publisher ) ;
}
} ;
if ( ! ! properties ) {
publisher = _this . initPublisher ( targetElement , properties , callback ) ;
}
else {
publisher = _this . initPublisher ( targetElement , callback ) ;
}
} ) ;
} ;
/ * *
* Returns a new local recorder for recording streams straight away from the browser
* @ param stream Stream to record
* /
OpenVidu . prototype . initLocalRecorder = function ( stream ) {
2018-05-08 13:01:34 +02:00
return new LocalRecorder _1 . LocalRecorder ( stream ) ;
2018-04-26 15:33:47 +02:00
} ;
/ * *
* Checks if the browser supports OpenVidu
* @ returns 1 if the browser supports OpenVidu , 0 otherwise
* /
OpenVidu . prototype . checkSystemRequirements = function ( ) {
var browser = platform . name ;
var version = platform . version ;
if ( ( browser !== 'Chrome' ) && ( browser !== 'Chrome Mobile' ) &&
( browser !== 'Firefox' ) && ( browser !== 'Firefox Mobile' ) && ( browser !== 'Firefox for iOS' ) &&
( browser !== 'Opera' ) && ( browser !== 'Opera Mobile' ) &&
( browser !== 'Safari' ) ) {
return 0 ;
}
else {
return 1 ;
}
} ;
/ * *
* Collects information about the media input devices available on the system . You can pass property ` deviceId ` of a [ [ Device ] ] object as value of ` audioSource ` or ` videoSource ` properties in [ [ initPublisher ] ] method
* /
OpenVidu . prototype . getDevices = function ( ) {
return new Promise ( function ( resolve , reject ) {
navigator . mediaDevices . enumerateDevices ( ) . then ( function ( deviceInfos ) {
var devices = [ ] ;
deviceInfos . forEach ( function ( deviceInfo ) {
if ( deviceInfo . kind === 'audioinput' || deviceInfo . kind === 'videoinput' ) {
devices . push ( {
kind : deviceInfo . kind ,
deviceId : deviceInfo . deviceId ,
label : deviceInfo . label
} ) ;
}
} ) ;
resolve ( devices ) ;
} ) [ "catch" ] ( function ( error ) {
console . error ( 'Error getting devices' , error ) ;
reject ( error ) ;
} ) ;
} ) ;
} ;
/ * *
* Get a MediaStream object that you can customize before calling [ [ initPublisher ] ] ( pass _MediaStreamTrack _ property of the _MediaStream _ value resolved by the Promise as ` audioSource ` or ` videoSource ` properties in [ [ initPublisher ] ] )
*
* Parameter ` options ` is the same as in [ [ initPublisher ] ] second parameter ( of type [ [ PublisherProperties ] ] ) , but only the following properties will be applied : ` audioSource ` , ` videoSource ` , ` frameRate ` , ` resolution `
*
* To customize the Publisher ' s video , the API for HTMLCanvasElement is very useful . For example , to get a black - and - white video at 10 fps and HD resolution with no sound :
* ` ` `
* var OV = new OpenVidu ( ) ;
* var FRAME _RATE = 10 ;
*
* OV . getUserMedia ( {
* audioSource : false ;
* videoSource : undefined ,
* resolution : '1280x720' ,
* frameRate : FRAME _RATE
* } )
* . then ( mediaStream => {
*
* var videoTrack = mediaStream . getVideoTracks ( ) [ 0 ] ;
* var video = document . createElement ( 'video' ) ;
* video . srcObject = new MediaStream ( [ videoTrack ] ) ;
*
* var canvas = document . createElement ( 'canvas' ) ;
* var ctx = canvas . getContext ( '2d' ) ;
* ctx . filter = 'grayscale(100%)' ;
*
* video . addEventListener ( 'play' , ( ) => {
* var loop = ( ) => {
* if ( ! video . paused && ! video . ended ) {
* ctx . drawImage ( video , 0 , 0 , 300 , 170 ) ;
* setTimeout ( loop , 1000 / FRAME _RATE ) ; // Drawing at 10 fps
* }
* } ;
* loop ( ) ;
* } ) ;
* video . play ( ) ;
*
* var grayVideoTrack = canvas . captureStream ( FRAME _RATE ) . getVideoTracks ( ) [ 0 ] ;
* var publisher = this . OV . initPublisher (
* myHtmlTarget ,
* {
* audioSource : false ,
* videoSource : grayVideoTrack
* } ) ;
* } ) ;
* ` ` `
* /
OpenVidu . prototype . getUserMedia = function ( options ) {
var _this = this ;
return new Promise ( function ( resolve , reject ) {
_this . generateMediaConstraints ( options )
. then ( function ( constraints ) {
navigator . mediaDevices . getUserMedia ( constraints )
. then ( function ( mediaStream ) {
resolve ( mediaStream ) ;
} ) [ "catch" ] ( function ( error ) {
var errorName ;
var errorMessage = error . toString ( ) ;
if ( ! ( options . videoSource === 'screen' ) ) {
2018-06-01 14:39:38 +02:00
errorName = OpenViduError _1 . OpenViduErrorName . DEVICE _ACCESS _DENIED ;
2018-04-26 15:33:47 +02:00
}
else {
errorName = OpenViduError _1 . OpenViduErrorName . SCREEN _CAPTURE _DENIED ;
}
reject ( new OpenViduError _1 . OpenViduError ( errorName , errorMessage ) ) ;
} ) ;
} ) [ "catch" ] ( function ( error ) {
reject ( error ) ;
} ) ;
} ) ;
} ;
/* tslint:disable:no-empty */
/ * *
* Disable all logging except error level
* /
OpenVidu . prototype . enableProdMode = function ( ) {
console . log = function ( ) { } ;
console . debug = function ( ) { } ;
console . info = function ( ) { } ;
console . warn = function ( ) { } ;
} ;
/* tslint:enable:no-empty */
/ * *
* Set OpenVidu advanced configuration options . Currently ` configuration ` is an object with the following optional properties ( see [ [ OpenViduAdvancedConfiguration ] ] for more details ) :
* - ` iceServers ` : set custom STUN / TURN servers to be used by OpenVidu Browser
* - ` screenShareChromeExtension ` : url to a custom screen share extension for Chrome to be used instead of the default one , based on ours [ https : //github.com/OpenVidu/openvidu-screen-sharing-chrome-extension](https://github.com/OpenVidu/openvidu-screen-sharing-chrome-extension)
* - ` publisherSpeakingEventsOptions ` : custom configuration for the [ [ PublisherSpeakingEvent ] ] feature
* /
OpenVidu . prototype . setAdvancedConfiguration = function ( configuration ) {
this . advancedConfiguration = configuration ;
} ;
/* Hidden methods */
/ * *
* @ hidden
* /
OpenVidu . prototype . generateMediaConstraints = function ( publisherProperties ) {
var _this = this ;
return new Promise ( function ( resolve , reject ) {
var audio , video ;
if ( publisherProperties . audioSource === null || publisherProperties . audioSource === false ) {
audio = false ;
}
else if ( publisherProperties . audioSource === undefined ) {
audio = true ;
}
else {
audio = publisherProperties . audioSource ;
}
if ( publisherProperties . videoSource === null || publisherProperties . videoSource === false ) {
video = false ;
}
else {
video = {
height : {
ideal : 480
} ,
width : {
ideal : 640
}
} ;
}
var mediaConstraints = {
audio : audio ,
video : video
} ;
if ( typeof mediaConstraints . audio === 'string' ) {
mediaConstraints . audio = { deviceId : { exact : mediaConstraints . audio } } ;
}
if ( mediaConstraints . video ) {
if ( ! ! publisherProperties . resolution ) {
var widthAndHeight = publisherProperties . resolution . toLowerCase ( ) . split ( 'x' ) ;
var width = Number ( widthAndHeight [ 0 ] ) ;
var height = Number ( widthAndHeight [ 1 ] ) ;
mediaConstraints . video . width . ideal = width ;
mediaConstraints . video . height . ideal = height ;
}
if ( ! ! publisherProperties . frameRate ) {
mediaConstraints . video . frameRate = { ideal : publisherProperties . frameRate } ;
}
if ( ! ! publisherProperties . videoSource && typeof publisherProperties . videoSource === 'string' ) {
if ( publisherProperties . videoSource === 'screen' ) {
2018-06-27 16:29:31 +02:00
if ( platform . name !== 'Chrome' && platform . name . indexOf ( 'Firefox' ) === - 1 ) {
2018-04-26 15:33:47 +02:00
var error = new OpenViduError _1 . OpenViduError ( OpenViduError _1 . OpenViduErrorName . SCREEN _SHARING _NOT _SUPPORTED , 'You can only screen share in desktop Chrome and Firefox. Detected browser: ' + platform . name ) ;
console . error ( error ) ;
reject ( error ) ;
}
else {
2018-06-27 16:29:31 +02:00
if ( ! ! _this . advancedConfiguration . screenShareChromeExtension && ! ( platform . name . indexOf ( 'Firefox' ) !== - 1 ) ) {
2018-04-26 15:33:47 +02:00
// Custom screen sharing extension for Chrome
2018-06-27 16:29:31 +02:00
screenSharing . getScreenConstraints ( function ( error , screenConstraints ) {
if ( ! ! error || ! ! screenConstraints . mandatory && screenConstraints . mandatory . chromeMediaSource === 'screen' ) {
if ( error === 'permission-denied' || error === 'PermissionDeniedError' ) {
var error _1 = new OpenViduError _1 . OpenViduError ( OpenViduError _1 . OpenViduErrorName . SCREEN _CAPTURE _DENIED , 'You must allow access to one window of your desktop' ) ;
console . error ( error _1 ) ;
reject ( error _1 ) ;
}
else {
var extensionId = _this . advancedConfiguration . screenShareChromeExtension . split ( '/' ) . pop ( ) . trim ( ) ;
screenSharing . getChromeExtensionStatus ( extensionId , function ( status ) {
if ( status === 'installed-disabled' ) {
var error _2 = new OpenViduError _1 . OpenViduError ( OpenViduError _1 . OpenViduErrorName . SCREEN _EXTENSION _DISABLED , 'You must enable the screen extension' ) ;
console . error ( error _2 ) ;
reject ( error _2 ) ;
}
if ( status === 'not-installed' ) {
var error _3 = new OpenViduError _1 . OpenViduError ( OpenViduError _1 . OpenViduErrorName . SCREEN _EXTENSION _NOT _INSTALLED , _this . advancedConfiguration . screenShareChromeExtension ) ;
console . error ( error _3 ) ;
reject ( error _3 ) ;
}
} ) ;
}
2018-04-26 15:33:47 +02:00
}
2018-06-27 16:29:31 +02:00
else {
mediaConstraints . video = screenConstraints ;
resolve ( mediaConstraints ) ;
2018-04-26 15:33:47 +02:00
}
} ) ;
}
else {
// Default screen sharing extension for Chrome
screenSharingAuto . getScreenId ( function ( error , sourceId , screenConstraints ) {
if ( ! ! error ) {
if ( error === 'not-installed' ) {
2018-06-27 16:29:31 +02:00
var extensionUrl = ! ! _this . advancedConfiguration . screenShareChromeExtension ? _this . advancedConfiguration . screenShareChromeExtension :
'https://chrome.google.com/webstore/detail/openvidu-screensharing/lfcgfepafnobdloecchnfaclibenjold' ;
var error _4 = new OpenViduError _1 . OpenViduError ( OpenViduError _1 . OpenViduErrorName . SCREEN _EXTENSION _NOT _INSTALLED , extensionUrl ) ;
console . error ( error _4 ) ;
reject ( error _4 ) ;
2018-04-26 15:33:47 +02:00
}
else if ( error === 'installed-disabled' ) {
2018-06-27 16:29:31 +02:00
var error _5 = new OpenViduError _1 . OpenViduError ( OpenViduError _1 . OpenViduErrorName . SCREEN _EXTENSION _DISABLED , 'You must enable the screen extension' ) ;
console . error ( error _5 ) ;
reject ( error _5 ) ;
2018-04-26 15:33:47 +02:00
}
else if ( error === 'permission-denied' ) {
2018-06-27 16:29:31 +02:00
var error _6 = new OpenViduError _1 . OpenViduError ( OpenViduError _1 . OpenViduErrorName . SCREEN _CAPTURE _DENIED , 'You must allow access to one window of your desktop' ) ;
console . error ( error _6 ) ;
reject ( error _6 ) ;
2018-04-26 15:33:47 +02:00
}
}
else {
mediaConstraints . video = screenConstraints . video ;
resolve ( mediaConstraints ) ;
}
} ) ;
}
publisherProperties . videoSource = 'screen' ;
}
}
else {
// tslint:disable-next-line:no-string-literal
mediaConstraints . video [ 'deviceId' ] = { exact : publisherProperties . videoSource } ;
resolve ( mediaConstraints ) ;
}
}
else {
resolve ( mediaConstraints ) ;
}
}
else {
resolve ( mediaConstraints ) ;
}
} ) ;
} ;
/ * *
* @ hidden
* /
OpenVidu . prototype . startWs = function ( onConnectSucces ) {
var config = {
heartbeat : 5000 ,
sendCloseMessage : false ,
ws : {
uri : this . wsUri ,
useSockJS : false ,
onconnected : onConnectSucces ,
ondisconnect : this . disconnectCallback . bind ( this ) ,
onreconnecting : this . reconnectingCallback . bind ( this ) ,
onreconnected : this . reconnectedCallback . bind ( this )
} ,
rpc : {
2018-06-27 16:29:31 +02:00
requestTimeout : 10000 ,
2018-04-26 15:33:47 +02:00
participantJoined : this . session . onParticipantJoined . bind ( this . session ) ,
participantPublished : this . session . onParticipantPublished . bind ( this . session ) ,
participantUnpublished : this . session . onParticipantUnpublished . bind ( this . session ) ,
participantLeft : this . session . onParticipantLeft . bind ( this . session ) ,
participantEvicted : this . session . onParticipantEvicted . bind ( this . session ) ,
recordingStarted : this . session . onRecordingStarted . bind ( this . session ) ,
recordingStopped : this . session . onRecordingStopped . bind ( this . session ) ,
sendMessage : this . session . onNewMessage . bind ( this . session ) ,
iceCandidate : this . session . recvIceCandidate . bind ( this . session ) ,
mediaError : this . session . onMediaError . bind ( this . session )
}
} ;
this . jsonRpcClient = new RpcBuilder . clients . JsonRpcClient ( config ) ;
} ;
/ * *
* @ hidden
* /
OpenVidu . prototype . closeWs = function ( ) {
this . jsonRpcClient . close ( ) ;
} ;
/ * *
* @ hidden
* /
OpenVidu . prototype . sendRequest = function ( method , params , callback ) {
if ( params && params instanceof Function ) {
callback = params ;
params = { } ;
}
console . debug ( 'Sending request: {method:"' + method + '", params: ' + JSON . stringify ( params ) + '}' ) ;
this . jsonRpcClient . send ( method , params , callback ) ;
} ;
/ * *
* @ hidden
* /
OpenVidu . prototype . isMediaStreamTrack = function ( mediaSource ) {
var is = ( ! ! mediaSource &&
mediaSource . enabled !== undefined && typeof mediaSource . enabled === 'boolean' &&
mediaSource . id !== undefined && typeof mediaSource . id === 'string' &&
mediaSource . kind !== undefined && typeof mediaSource . kind === 'string' &&
mediaSource . label !== undefined && typeof mediaSource . label === 'string' &&
mediaSource . muted !== undefined && typeof mediaSource . muted === 'boolean' &&
mediaSource . readyState !== undefined && typeof mediaSource . readyState === 'string' ) ;
return is ;
} ;
/ * *
* @ hidden
* /
OpenVidu . prototype . getWsUri = function ( ) {
return this . wsUri ;
} ;
/ * *
* @ hidden
* /
OpenVidu . prototype . getSecret = function ( ) {
return this . secret ;
} ;
/ * *
* @ hidden
* /
OpenVidu . prototype . getRecorder = function ( ) {
return this . recorder ;
} ;
/* Private methods */
OpenVidu . prototype . disconnectCallback = function ( ) {
console . warn ( 'Websocket connection lost' ) ;
if ( this . isRoomAvailable ( ) ) {
this . session . onLostConnection ( ) ;
}
else {
alert ( 'Connection error. Please reload page.' ) ;
}
} ;
OpenVidu . prototype . reconnectingCallback = function ( ) {
console . warn ( 'Websocket connection lost (reconnecting)' ) ;
if ( this . isRoomAvailable ( ) ) {
this . session . onLostConnection ( ) ;
}
else {
alert ( 'Connection error. Please reload page.' ) ;
}
} ;
OpenVidu . prototype . reconnectedCallback = function ( ) {
console . warn ( 'Websocket reconnected' ) ;
} ;
OpenVidu . prototype . isRoomAvailable = function ( ) {
2018-05-08 13:01:34 +02:00
if ( this . session !== undefined && this . session instanceof Session _1 . Session ) {
2018-04-26 15:33:47 +02:00
return true ;
}
else {
console . warn ( 'Session instance not found' ) ;
return false ;
}
} ;
return OpenVidu ;
} ( ) ) ;
exports . OpenVidu = OpenVidu ;
//# sourceMappingURL=OpenVidu.js.map