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;
|
||||
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', this.onBeforeUnload);
|
||||
VideoService.exitVideo(sendUserUnshareWebcam);
|
||||
|
@ -229,9 +229,11 @@ class VideoProviderGraphql 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', this.onBeforeUnload);
|
||||
exitVideo();
|
||||
|
Loading…
Reference in New Issue
Block a user