{#if $showCallOverlay}
{#if camera}
{ if (assistantSpeaking) { stopAllAudio(); } }} > {#if emoji}
{emoji}
{:else if loading}
{:else}
{/if}
{/if}
{#if !camera}
{ if (assistantSpeaking) { stopAllAudio(); } }} > {#if emoji}
{emoji}
{:else if loading}
{:else}
{/if}
{:else}
{ stopCamera(); }} >
{/if}
{#if camera}
{ console.log(e.detail); selectedVideoInputDeviceId = e.detail; await stopVideoStream(); await startVideoStream(); }} >
{:else}
{ await navigator.mediaDevices.getUserMedia({ video: true }); startCamera(); }} >
{/if}
{ if (assistantSpeaking) { stopAllAudio(); } }} >
{#if loading} {$i18n.t('Thinking...')} {:else if assistantSpeaking} {$i18n.t('Tap to interrupt')} {:else} {$i18n.t('Listening...')} {/if}
{ showCallOverlay.set(false); }} type="button" >
{/if}