diff --git a/web.py b/web.py index aa4ae3f..208a7f0 100644 --- a/web.py +++ b/web.py @@ -861,7 +861,7 @@ function togglePlayer(idx, filename) { if (!open) { if (!audio.getAttribute('data-src-set')) { - audio.preload = 'metadata'; + audio.preload = 'auto'; audio.src = '/stream/' + encodeURIComponent(filename); audio.load(); audio.setAttribute('data-src-set','1'); @@ -931,6 +931,7 @@ function seekToSection(idx, filename, startSec, endSec, sectionIdx) { if (pbtn.getAttribute('aria-expanded') !== 'true') togglePlayer(idx, filename); activePlayerIdx = idx; const audio = document.getElementById('aud-'+idx); + audio.preload = 'auto'; const seekTo = Math.max(0, startSec - getPreroll()); const doSeek = () => { audio.currentTime = seekTo; audio.play().catch(() => {}); }; if (audio.readyState >= 1) doSeek(); @@ -1540,6 +1541,7 @@ function jumpToDaySection(si) { const audio = document.getElementById('aud-' + fileIdx); if (!audio) return; + audio.preload = 'auto'; const seekTo = Math.max(0, start - getPreroll()); const doSeek = () => { audio.currentTime = seekTo; audio.play().catch(() => {}); }; if (audio.readyState >= 1) doSeek();