Merge pull request #12743 from prlanzarin/u24-fix-ss-presch

fix(screenshare): fix client crash on presenter change
This commit is contained in:
Pedro Beschorner Marin 2021-07-07 18:07:05 -03:00 committed by GitHub
commit e8eab54de2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -182,7 +182,7 @@ export default class KurentoScreenshareBridge {
reconnecting: this.reconnecting,
bridge: BRIDGE_NAME
},
}, 'Screenshare broker failure');
}, `Screenshare broker failure: ${errorMessage}`);
// Screensharing was already successfully negotiated and error occurred during
// during call; schedule a reconnect
@ -289,7 +289,9 @@ export default class KurentoScreenshareBridge {
// If that's the case, clear the local sharing state in screen sharing UI
// component tracker to be extra sure we won't have any client-side state
// inconsistency - prlanzarin
if (this.broker.role === SEND_ROLE && !this.reconnecting) setSharingScreen(false);
if (this.broker && this.broker.role === SEND_ROLE && !this.reconnecting) {
setSharingScreen(false);
}
this.broker = null;
}
this.gdmStream = null;