From c2d47108fc5d9e5686316703b2b83c749cc00b8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Wed, 10 Feb 2021 19:33:42 +0100 Subject: [PATCH] remove users first interaction event. --- src/component/main.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/component/main.vue b/src/component/main.vue index 3bab91b4..63ba3543 100644 --- a/src/component/main.vue +++ b/src/component/main.vue @@ -474,7 +474,7 @@ // unmute on users first interaction if (this.autoplay) { - document.addEventListener('click', () => this.unmute(), { once: true }) + document.addEventListener('click', this.unmute, { once: true }) } } @@ -482,6 +482,9 @@ this.observer.disconnect() this.webrtc.disconnect() this.websocket.disconnect() + + // remove users first interaction event + document.removeEventListener('click', this.unmute) } @Watch('state.screen.size')