mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 17:17:49 +01:00
1
This commit is contained in:
parent
c7b01a6af3
commit
87eeac58a3
1 changed files with 7 additions and 0 deletions
|
@ -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();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue