taken from https://github.com/Linkcube/svelte-audio-controls ISC License --> (seeking = volumeSeeking = false)} onmousemove={trackMouse} /> {#if display} (audio.paused ? audio.play() : audio.pause())} > {#if paused} play_arrow {:else} pause {/if} (seeking = true)} onmouseenter={() => (showTooltip = true)} onmouseleave={() => (showTooltip = false)} onclick={seekAudio} style="--primary-color:{barPrimaryColor}; --secondary-color:{barSecondaryColor}" class="song-progress" > {formatSeconds(currentTime)}/{formatSeconds(duration)} (muted = !muted)} > {#if muted} volume_off {:else if volume < 0.01} volume_mute {:else if volume < 0.5} volume_down {:else} volume_up {/if} (volumeSeeking = true)} onclick={seekVolume} style="--primary-color:{barPrimaryColor}; --secondary-color:{barSecondaryColor}" class="volume-progress" > {#if !disableTooltip && (inlineTooltip || showTooltip)} {#if showTooltip} {seekText} {seekTrack} {:else if duration > 3600} --:--:-- {:else} --:-- {/if} {/if} {/if} (duration = d || 0)} bind:currentTime {muted} {volume} onplay={setMediaMetadataOnPlay} onended={bubble('ended')} {preload} >