taken from https://github.com/Linkcube/svelte-audio-controls ISC License --> { if (seeking && pendingSeekTime != null) { audio.currentTime = pendingSeekTime; currentTime = pendingSeekTime; updateTooltipText(pendingSeekTime); pendingSeekTime = null; } seeking = volumeSeeking = false; }} onmousemove={trackMouse} /> {#if display} (audio.paused ? audio.play() : audio.pause())} > {#if paused} play_arrow {:else} pause {/if} { seeking = true; updateSeekVisual(e); }} onmouseenter={() => (showTooltip = true)} onmouseleave={() => (showTooltip = false)} style="--primary-color:{barPrimaryColor}; --secondary-color:{barSecondaryColor}" class="song-progress" > {formatSeconds(currentTime, duration >= 3600)}/{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} onplay={setMediaMetadataOnPlay} onended={bubble('ended')} {preload} > {#if isSafari} {:else} {/if}