[IN TESTING] attempt to fix #103

This commit is contained in:
ashley 2024-07-26 20:40:10 +00:00
parent 64b52c36d9
commit 8054805054

View file

@ -767,6 +767,11 @@ function cstsRemaining(totalTimeInSeconds, elapsedTimeInSeconds) {
setInterval(()=>{
if(!document.getElementById("video").paused) {
document.getElementById("play-pause").innerHTML = pauseSVG;
}
else {
aud.pause()
document.getElementById("play-pause").innerHTML = playSVG;
}
}, 100);
//FIXME: saved playback intentionally overwritten
@ -970,7 +975,7 @@ function cstsRemaining(totalTimeInSeconds, elapsedTimeInSeconds) {
const aud = document.getElementById("aud");
const vid = document.getElementById("video");
function shouldPlay() {
if(vid.readyState === HTMLMediaElement.HAVE_ENOUGH_DATA && aud.readyState === HTMLMediaElement.HAVE_ENOUGH_DATA) {
if(vid.readyState === HTMLMediaElement.HAVE_ENOUGH_DATA) {
startPlayback();
}
}