mirror of https://github.com/OpenVidu/openvidu.git
Merge pull request #688 from Flamenco/patch-2
Check for outboundStreamOpts before accessing itpull/690/head
commit
6d37e4ce1f
|
@ -536,12 +536,15 @@ export class Stream {
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
isSendScreen(): boolean {
|
isSendScreen(): boolean {
|
||||||
|
if (!this.outboundStreamOpts) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
let screen = this.outboundStreamOpts.publisherProperties.videoSource === 'screen';
|
let screen = this.outboundStreamOpts.publisherProperties.videoSource === 'screen';
|
||||||
if (platform.isElectron()) {
|
if (platform.isElectron()) {
|
||||||
screen = typeof this.outboundStreamOpts.publisherProperties.videoSource === 'string' &&
|
screen = typeof this.outboundStreamOpts.publisherProperties.videoSource === 'string' &&
|
||||||
this.outboundStreamOpts.publisherProperties.videoSource.startsWith('screen:');
|
this.outboundStreamOpts.publisherProperties.videoSource.startsWith('screen:');
|
||||||
}
|
}
|
||||||
return !!this.outboundStreamOpts && screen;
|
return screen;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue