Merge pull request #688 from Flamenco/patch-2

Check for outboundStreamOpts before accessing it
pull/690/head
Pablo Fuente Pérez 2022-01-26 14:31:06 +01:00 committed by GitHub
commit 6d37e4ce1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -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;
}
/**