Merge pull request #20158 from prlanzarin/u30/fix/crash-videoprovider-onmessage
fix(bbb-html5): crash on video-provider unmount
This commit is contained in:
commit
3babf4c16e
@ -226,9 +226,11 @@ class VideoProvider extends Component {
|
|||||||
this._isMounted = false;
|
this._isMounted = false;
|
||||||
VideoService.updatePeerDictionaryReference({});
|
VideoService.updatePeerDictionaryReference({});
|
||||||
|
|
||||||
this.ws.onmessage = null;
|
if (this.ws) {
|
||||||
this.ws.onopen = null;
|
this.ws.onmessage = null;
|
||||||
this.ws.onclose = null;
|
this.ws.onopen = null;
|
||||||
|
this.ws.onclose = null;
|
||||||
|
}
|
||||||
|
|
||||||
window.removeEventListener('beforeunload', this.onBeforeUnload);
|
window.removeEventListener('beforeunload', this.onBeforeUnload);
|
||||||
VideoService.exitVideo(sendUserUnshareWebcam);
|
VideoService.exitVideo(sendUserUnshareWebcam);
|
||||||
|
@ -229,9 +229,11 @@ class VideoProviderGraphql extends Component {
|
|||||||
this._isMounted = false;
|
this._isMounted = false;
|
||||||
VideoService.updatePeerDictionaryReference({});
|
VideoService.updatePeerDictionaryReference({});
|
||||||
|
|
||||||
this.ws.onmessage = null;
|
if (this.ws) {
|
||||||
this.ws.onopen = null;
|
this.ws.onmessage = null;
|
||||||
this.ws.onclose = null;
|
this.ws.onopen = null;
|
||||||
|
this.ws.onclose = null;
|
||||||
|
}
|
||||||
|
|
||||||
window.removeEventListener('beforeunload', this.onBeforeUnload);
|
window.removeEventListener('beforeunload', this.onBeforeUnload);
|
||||||
exitVideo();
|
exitVideo();
|
||||||
|
Loading…
Reference in New Issue
Block a user