mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-10 09:18:27 +01:00
fix stuff
This commit is contained in:
parent
47833803b2
commit
96c61f26d0
1 changed files with 17 additions and 12 deletions
|
@ -755,17 +755,7 @@ background-color: #0000;
|
||||||
const timestamps = document.getElementById("timestamps");
|
const timestamps = document.getElementById("timestamps");
|
||||||
timestamps.innerText = `${csts(video.currentTime)}/${csts(video.duration)}`;
|
timestamps.innerText = `${csts(video.currentTime)}/${csts(video.duration)}`;
|
||||||
});
|
});
|
||||||
setTimeout(()=>{
|
|
||||||
video.addEventListener("seeking", (event) => {
|
|
||||||
if(!didFirstTimePlay) return;
|
|
||||||
if(qua != "medium") {
|
|
||||||
video.pause()
|
|
||||||
canPlayPause = false;
|
|
||||||
aud.pause()
|
|
||||||
aud.currentTime = event.target.currentTime
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, 200)
|
|
||||||
seekbar.addEventListener("input", (event) => {
|
seekbar.addEventListener("input", (event) => {
|
||||||
video.pause()
|
video.pause()
|
||||||
canPlayPause = false;
|
canPlayPause = false;
|
||||||
|
@ -774,6 +764,11 @@ background-color: #0000;
|
||||||
aud.currentTime = event.target.value
|
aud.currentTime = event.target.value
|
||||||
}
|
}
|
||||||
video.currentTime = event.target.value
|
video.currentTime = event.target.value
|
||||||
|
canPlayPause = true;
|
||||||
|
setTimeout(()=>{
|
||||||
|
video.play();
|
||||||
|
aud.play();
|
||||||
|
}, 200)
|
||||||
});
|
});
|
||||||
|
|
||||||
// Play/Pause
|
// Play/Pause
|
||||||
|
@ -890,7 +885,17 @@ background-color: #0000;
|
||||||
seekbar.value = 0
|
seekbar.value = 0
|
||||||
setTime = true
|
setTime = true
|
||||||
}
|
}
|
||||||
|
setTimeout(()=>{
|
||||||
|
video.addEventListener("seeking", (event) => {
|
||||||
|
if(!didFirstTimePlay) return;
|
||||||
|
if(qua != "medium") {
|
||||||
|
video.pause()
|
||||||
|
canPlayPause = false;
|
||||||
|
aud.pause()
|
||||||
|
aud.currentTime = event.target.currentTime
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}, 500)
|
||||||
}
|
}
|
||||||
const aud = document.getElementById("aud");
|
const aud = document.getElementById("aud");
|
||||||
const vid = document.getElementById("video");
|
const vid = document.getElementById("video");
|
||||||
|
|
Loading…
Reference in a new issue