diff --git a/html/poketube.ejs b/html/poketube.ejs
index 0de14a29..d94ddc41 100644
--- a/html/poketube.ejs
+++ b/html/poketube.ejs
@@ -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();
});