Use preload=metadata instead of auto to avoid downloading entire next video
This commit is contained in:
parent
7574318ba8
commit
63f62cf234
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue