From 8d9042aeeb268314ff935e739f12cbed09c3c456 Mon Sep 17 00:00:00 2001 From: Ajay Date: Sun, 3 Jul 2022 00:22:56 -0400 Subject: [PATCH] Only ignore play event when buffering --- src/content.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/content.ts b/src/content.ts index bb4bdf9a..440d2da1 100644 --- a/src/content.ts +++ b/src/content.ts @@ -695,7 +695,8 @@ function setupVideoListeners() { // If it is not the first event, then the only way to get to 0 is if there is a seek event // This check makes sure that changing the video resolution doesn't cause the extension to think it // gone back to the begining - if (!firstEvent && video.currentTime === 0) return; + if (video.readyState <= HTMLMediaElement.HAVE_CURRENT_DATA + && !firstEvent && video.currentTime === 0) return; firstEvent = false; updateVirtualTime();