add autoload option, fix rare loading issue

This commit is contained in:
torcado 2023-02-15 17:49:22 -05:00
parent 6b37b1af89
commit 060046ffe9
2 changed files with 13 additions and 0 deletions

View file

@ -1114,11 +1114,16 @@
});
loaderEl.addEventListener('canplay', e => {
removeLoading(entry, true);
if(entry.feature && entry.autoplay){
playerEl.play();
}
});
loaderEl.volume = 0;
loaderEl.src = entry.file;
entry.started = false;
entry.loading = true;
entry.loaderEl = loaderEl;
}
});
loadEntry(media[mod(featureIndex, media.length)]);