diff --git a/app.js b/app.js index 4653ea7..73f50da 100644 --- a/app.js +++ b/app.js @@ -1,4 +1,4 @@ -const APP_VERSION = '0.1.0-beta'; +const APP_VERSION = '0.1.1-beta'; const playlist = [ { url: 'https://feed.falsefinish.club/Echo%20Reality/PINK%20FLIGHT/MP3%20BOUNCE/01.%20PINK%20FLIGHT%20ATTENDANT.mp3', name: 'TRACK 1 - PINK FLIGHT ATTENDANT' }, { url: 'https://feed.falsefinish.club/Echo%20Reality/PINK%20FLIGHT/MP3%20BOUNCE/02.%20NOW.mp3', name: 'TRACK 2 - NOW' }, @@ -1146,6 +1146,13 @@ audio.addEventListener('timeupdate', () => { updateTapeSizes(); }); +// Update time display when metadata loads (fixes cold start 0:00 / 0:00 issue) +audio.addEventListener('loadedmetadata', () => { + const current = formatTime(audio.currentTime); + const duration = formatTime(audio.duration); + timeDisplay.textContent = `${current} / ${duration}`; +}); + // Format time helper function formatTime(seconds) { if (isNaN(seconds)) return '00:00';