diff --git a/src/lib/components/calling/CallScreen.svelte b/src/lib/components/calling/CallScreen.svelte index b6b70086c..6e1b5a5e1 100644 --- a/src/lib/components/calling/CallScreen.svelte +++ b/src/lib/components/calling/CallScreen.svelte @@ -24,7 +24,7 @@ let showVolumeMixer = false let showCallSettings = false - let muted: boolean = VoiceRTCInstance.callOptions.audio.enabled + let muted: boolean = !VoiceRTCInstance.callOptions.audio.enabled let cameraEnabled: boolean = get(Store.state.devices.cameraEnabled) export let deafened: boolean = get(Store.state.devices.deafened) @@ -52,15 +52,18 @@ $: userCache = Store.getUsersLookup(chat.users) $: userCallOptions = VoiceRTCInstance.callOptions $: remoteStreams = Store.state.activeCallMeta + $: ownUserName = get(Store.state.user).name let subscribeOne = Store.state.devices.muted.subscribe(state => { muted = state userCallOptions = VoiceRTCInstance.callOptions + userCallOptions.audio.enabled = !muted }) let subscribeTwo = Store.state.devices.cameraEnabled.subscribe(state => { cameraEnabled = state userCallOptions = VoiceRTCInstance.callOptions + userCallOptions.video.enabled = cameraEnabled }) let subscribeThree = Store.state.devices.deafened.subscribe(state => { @@ -158,17 +161,25 @@