{device.friendlyName}
{#if application && !application.isIdleScreen}
{application.displayName}
{#if application.statusText !== application.displayName} ยท {application.statusText} {/if}
{/if}
{#if application && !application.isIdleScreen}
dispatch("stop", { device })} > {_("popupStopButtonTitle")}
{:else}
{ isConnecting = true; dispatch("cast", { device }); }} > {#if isConnecting} {_("popupCastingButtonTitle", "")}
{:else} {_("popupCastButtonTitle")} {/if}
{/if}
{ isExpanded = !isExpanded; }} /> {#if isExpanded}
{#if mediaStatus}
{ switch (mediaStatus?.playerState) { case PlayerState.PLAYING: sendMediaMessage({ type: "PAUSE" }); break; case PlayerState.PAUSED: sendMediaMessage({ type: "PLAY" }); break; } }} on:previous={() => { sendMediaMessage({ type: "QUEUE_UPDATE", jump: -1 }); }} on:next={() => { sendMediaMessage({ type: "QUEUE_UPDATE", jump: 1 }); }} on:seek={ev => { sendMediaMessage({ type: "SEEK", currentTime: ev.detail.position }); }} on:trackChanged={ev => { sendMediaMessage({ type: "EDIT_TRACKS_INFO", activeTrackIds: ev.detail.activeTrackIds }); }} on:volumeChanged={ev => { sendReceiverMessage({ type: "SET_VOLUME", volume: ev.detail }); }} /> {/if}
{/if}