{#if isMobile}
toggleUiOpen()} aria-label={snap.uiOpen ? "Close player" : "Open player"} > {snap.uiOpen ? "Close" : "Player"}
{nowPlayingLabel()}
{formatTime(currentTime)} / {formatTime(duration)}
{ prev(currentTime); void syncAndAutoplay(); }} > Prev
{ if (!audioEl) return; if (audioEl.paused) void audioEl.play(); else audioEl.pause(); }} disabled={!snap.currentTrack} > {isPlaying ? "Pause" : "Play"}
{ next(); void syncAndAutoplay(); }} > Next
{#if snap.uiOpen}
toggleShuffle()} > Shuffle: {snap.shuffleEnabled ? "On" : "Off"}
toggleWrap()} > Wrap: {snap.wrapEnabled ? "On" : "Off"}
Vol
setVolume( Number((e.currentTarget as HTMLInputElement).value), )} />
Queue ({snap.queue.length})
{#if snap.queue.length === 0}
Queue is empty.
{:else}
{#each queueDisplay as item (item.track.id)}
{ jumpToTrack(item.track.id); void syncAndAutoplay(); }} > {#if item.isCurrent}
▶
{/if} {titleForTrack(item.track)}
removeTrack(item.track.id)} > Remove
{/each}
{/if}
{/if}
{:else}
{/if}