mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-23 01:37:47 +01:00
[IN TESTING] attempt to fix #103
This commit is contained in:
parent
64b52c36d9
commit
8054805054
1 changed files with 6 additions and 1 deletions
|
@ -767,6 +767,11 @@ function cstsRemaining(totalTimeInSeconds, elapsedTimeInSeconds) {
|
||||||
setInterval(()=>{
|
setInterval(()=>{
|
||||||
if(!document.getElementById("video").paused) {
|
if(!document.getElementById("video").paused) {
|
||||||
document.getElementById("play-pause").innerHTML = pauseSVG;
|
document.getElementById("play-pause").innerHTML = pauseSVG;
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
aud.pause()
|
||||||
|
document.getElementById("play-pause").innerHTML = playSVG;
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
//FIXME: saved playback intentionally overwritten
|
//FIXME: saved playback intentionally overwritten
|
||||||
|
@ -970,7 +975,7 @@ function cstsRemaining(totalTimeInSeconds, elapsedTimeInSeconds) {
|
||||||
const aud = document.getElementById("aud");
|
const aud = document.getElementById("aud");
|
||||||
const vid = document.getElementById("video");
|
const vid = document.getElementById("video");
|
||||||
function shouldPlay() {
|
function shouldPlay() {
|
||||||
if(vid.readyState === HTMLMediaElement.HAVE_ENOUGH_DATA && aud.readyState === HTMLMediaElement.HAVE_ENOUGH_DATA) {
|
if(vid.readyState === HTMLMediaElement.HAVE_ENOUGH_DATA) {
|
||||||
startPlayback();
|
startPlayback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue