mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-14 05:48:57 +01:00
fix seekbar on fulscreen
This commit is contained in:
parent
f124efc8e3
commit
47833803b2
1 changed files with 13 additions and 0 deletions
|
@ -755,6 +755,17 @@ 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;
|
||||||
|
@ -788,6 +799,8 @@ background-color: #0000;
|
||||||
playPauseButton.addEventListener("click", () => {
|
playPauseButton.addEventListener("click", () => {
|
||||||
toggleVideo()
|
toggleVideo()
|
||||||
});
|
});
|
||||||
|
video.addEventListener("pause", ()=>{if(qua != "medium") {aud.pause()}});
|
||||||
|
video.addEventListener("play", ()=>{if(qua != "medium") {aud.play()}})
|
||||||
video.addEventListener("click", toggleVideo);
|
video.addEventListener("click", toggleVideo);
|
||||||
video.addEventListener("dblclick", () => {
|
video.addEventListener("dblclick", () => {
|
||||||
document.documentElement.requestFullscreen();
|
document.documentElement.requestFullscreen();
|
||||||
|
|
Loading…
Reference in a new issue