Use preload=metadata instead of auto to avoid downloading entire next video

This commit is contained in:
russell@unturf.com 2026-02-08 13:15:08 -05:00
parent 7574318ba8
commit 63f62cf234

View file

@ -74,7 +74,7 @@
function createStandbyMedia(type) {
if (type === 'static') return null;
var el = document.createElement(type === 'audio' ? 'audio' : 'video');
el.preload = 'auto';
el.preload = 'metadata';
el.style.display = 'none';
var container = document.getElementById('watch-media-container');
if (container) container.appendChild(el);
@ -527,7 +527,7 @@
preloadedData = data;
if (standbyMedia && data.media_url && (data.media_type === 'video' || data.media_type === 'audio')) {
standbyMedia.src = data.media_url;
standbyMedia.preload = 'auto';
standbyMedia.preload = 'metadata';
}
}).catch(function() {
preloadedData = null;