Merge pull request #20008 from prlanzarin/u27/fix/crash-videoprovider-onmessage

[2.7] fix(bbb-html5): crash on video-provider unmount
This commit is contained in:
Anton Georgiev 2024-04-12 15:54:17 -04:00 committed by GitHub
commit 916d601d2b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -220,9 +220,11 @@ class VideoProvider extends Component {
this._isMounted = false;
VideoService.updatePeerDictionaryReference({});
this.ws.onmessage = null;
this.ws.onopen = null;
this.ws.onclose = null;
if (this.ws) {
this.ws.onmessage = null;
this.ws.onopen = null;
this.ws.onclose = null;
}
window.removeEventListener('beforeunload', VideoProvider.onBeforeUnload);
VideoService.exitVideo();