diff --git a/openvidu-browser/src/OpenVidu/Stream.ts b/openvidu-browser/src/OpenVidu/Stream.ts index 4cb8dcff..fa88527f 100644 --- a/openvidu-browser/src/OpenVidu/Stream.ts +++ b/openvidu-browser/src/OpenVidu/Stream.ts @@ -536,12 +536,15 @@ export class Stream { * @hidden */ isSendScreen(): boolean { + if (!this.outboundStreamOpts) { + return false; + } let screen = this.outboundStreamOpts.publisherProperties.videoSource === 'screen'; if (platform.isElectron()) { screen = typeof this.outboundStreamOpts.publisherProperties.videoSource === 'string' && this.outboundStreamOpts.publisherProperties.videoSource.startsWith('screen:'); } - return !!this.outboundStreamOpts && screen; + return screen; } /**