1
Fork 0
This commit is contained in:
ashley 2024-08-03 17:56:49 +00:00
parent c7b01a6af3
commit 87eeac58a3

View file

@ -648,6 +648,12 @@ background-color: #0000;
// Pause video and audio when seeking
video.pause();
audio.pause();
// Sync audio with video during seeking
if (Math.abs(video.currentTime() - audio.currentTime) > 0.3) {
audio.currentTime = video.currentTime();
}
if (!checkAudioBuffer()) {
// Resume playback when buffering is sufficient
audio.addEventListener('canplay', () => {
@ -658,6 +664,7 @@ background-color: #0000;
}
};
video.on('play', () => {
audio.play();
});