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 @@
- +
+ +
{ownUserName}
+ {#if !userCallOptions.audio.enabled} +
+ +
+ {/if} +
{#each chat.users as user (user)} {#if user === get(Store.state.user).key && !userCallOptions.video.enabled} @@ -188,17 +199,26 @@
{/if} {:else if $userCache[user] && $userCache[user].key !== get(Store.state.user).key && $remoteStreams[user]} - +
+ +
{$userCache[user].name}
+ {#if !$remoteStreams[user].user.audioEnabled} +
+ +
+ {/if} +
+ {#if !$remoteStreams[user].stream || !$remoteStreams[user].user.videoEnabled} diff --git a/src/lib/media/Voice.ts b/src/lib/media/Voice.ts index c205bd980..8303934a6 100644 --- a/src/lib/media/Voice.ts +++ b/src/lib/media/Voice.ts @@ -526,6 +526,7 @@ export class VoiceRTC { private createAndSetRoom() { log.debug(`Creating/Joining room in channel ${this.channel}`) + Store.updateMuted(true) this.call = new CallRoom( joinRoom( {