From e31efbbf8195f48e29a97f06031f367e4082d131 Mon Sep 17 00:00:00 2001 From: Ajay Date: Fri, 21 Apr 2023 22:16:13 -0400 Subject: [PATCH] Fix looped videos sometimes not skipping start segment Fixes #1723 --- src/content.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/content.ts b/src/content.ts index 503c8b78..b3ba9b33 100644 --- a/src/content.ts +++ b/src/content.ts @@ -863,7 +863,12 @@ function setupVideoListeners() { updateVirtualTime(); clearWaitingTime(); - startSponsorSchedule(); + // Sometimes looped videos loop back to almost zero, but not quite + if (getVideo().loop && getVideo().currentTime < 0.2) { + startSponsorSchedule(false, 0); + } else { + startSponsorSchedule(); + } } else { updateActiveSegment(getVideo().currentTime);