Add removeEventListener on unmount
This commit is contained in:
parent
272b1a3e30
commit
b07cb6d15e
@ -184,6 +184,8 @@ export default class WebcamDraggableOverlay extends Component {
|
||||
});
|
||||
|
||||
document.removeEventListener('webcamFullscreenButtonChange', this.fullscreenButtonChange);
|
||||
document.removeEventListener('videoListUsersChange', this.getVideoListUsersChange);
|
||||
document.removeEventListener('videoFocusChange', this.eventVideoFocusChangeListener);
|
||||
}
|
||||
|
||||
getVideoListUsersChange() {
|
||||
@ -263,7 +265,6 @@ export default class WebcamDraggableOverlay extends Component {
|
||||
const {
|
||||
left: webcamLeft,
|
||||
top: webcamTop,
|
||||
height: webcamHeight,
|
||||
} = webcamBySelectorRect;
|
||||
|
||||
const mediaContainerRect = mediaContainer.getBoundingClientRect();
|
||||
|
Loading…
Reference in New Issue
Block a user