diff --git a/src/components/Viewer.svelte b/src/components/Viewer.svelte
index 2d5f42f..b6f811f 100644
--- a/src/components/Viewer.svelte
+++ b/src/components/Viewer.svelte
@@ -1,9 +1,13 @@
-
+
+ {#if !loaded}
+ LOADING TRACK
+ {/if}
+
{#if duration}
{currentTimeText}
{ if (player && !$paused) player.pause() }}
on:mouseup={() => { if (player && !$paused) player.play() }}>
{durationText}
- {:else}
- LOADING TRACK
{/if}
@@ -32,6 +34,7 @@
let currentTime = null
let duration = null
+ let loaded = false
let currentTimeText = null
let durationText = null
@@ -57,6 +60,7 @@
duration = null
currentTime = null
$loading = true
+ loaded = false
player.off('playing', updateViewerDurationCallback)
player.load($current.data.id, !$paused)
@@ -97,6 +101,7 @@
updatePlayerVolume($volume)
player.on('unstarted', () => {
+ loaded = true
player.once('playing', updateViewerDurationCallback)
})