fix some autosync issue lol

This commit is contained in:
ashley 2024-07-05 17:18:38 +00:00
parent 5be52a9d7b
commit 70221f1f41

View file

@ -780,16 +780,7 @@ background-color: #0000;
toggleVideo() toggleVideo()
}); });
setInterval(() => { setInterval(() => {
if(Math.round(video.currentTime) != Math.round(aud.currentTime)) { if(Math.round(video.currentTime) - Math.round(aud.currentTime) > 1 || Math.round(video.currentTime) - Math.round(aud.currentTime) < -1 || Math.round(aud.currentTime) - Math.round(video.currentTime) > 1 || Math.round(aud.currentTime) - Math.round(video.currentTime) < -1) {
video.pause(); aud.pause(); playPauseButton.innerHTML = playSVG;
video.currentTime > aud.currentTime ? aud.currentTime = video.currentTime : video.currentTime = aud.currentTime;
setTimeout(() => {
video.play(); aud.play(); playPauseButton.innerHTML = pauseSVG;
}, 800)
}
}, 1000)
setInterval(() => {
if(Math.round(video.currentTime) != Math.round(aud.currentTime)) {
video.pause(); aud.pause(); playPauseButton.innerHTML = playSVG; video.pause(); aud.pause(); playPauseButton.innerHTML = playSVG;
video.currentTime > aud.currentTime ? aud.currentTime = video.currentTime : video.currentTime = aud.currentTime; video.currentTime > aud.currentTime ? aud.currentTime = video.currentTime : video.currentTime = aud.currentTime;
setTimeout(() => { setTimeout(() => {