diff --git a/components/views/navigation/sidebar/controls/Controls.html b/components/views/navigation/sidebar/controls/Controls.html index 0de394ae73..1ca23e4588 100644 --- a/components/views/navigation/sidebar/controls/Controls.html +++ b/components/views/navigation/sidebar/controls/Controls.html @@ -28,6 +28,7 @@ :text="$t('controls.video')" :action="() => toggleMute('video')" :loading="isLoading" + :disabled="!inCall" loadingText="" > diff --git a/components/views/navigation/sidebar/controls/Controls.vue b/components/views/navigation/sidebar/controls/Controls.vue index 790d87073a..67199c8c6d 100644 --- a/components/views/navigation/sidebar/controls/Controls.vue +++ b/components/views/navigation/sidebar/controls/Controls.vue @@ -37,11 +37,14 @@ export default Vue.extend({ return this.audio.muted }, videoMuted(): boolean { - return this.video.disabled + return this.inCall ? this.video.disabled : false }, screenMuted(): boolean { return p2p.id && this.webrtc.streamMuted[p2p.id]?.screen }, + inCall(): boolean { + return this.webrtc.activeCall !== undefined + }, }, methods: { /** @@ -54,7 +57,7 @@ export default Vue.extend({ try { if (kind === 'audio') { this.$store.dispatch('audio/toggleMute', undefined, { root: true }) - } else if (kind === 'video') { + } else if (kind === 'video' && this.inCall) { this.$store.dispatch('video/toggleMute', undefined, { root: true }) } } catch (e: any) {