From 26e73c515c7f692e0b74bd9a29a2651ec857eb1c Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sat, 2 Oct 2021 15:23:59 -0400 Subject: [PATCH] Fix seeking issues with poi segment --- src/content.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/content.ts b/src/content.ts index 1762eb54..7fd0cd1e 100644 --- a/src/content.ts +++ b/src/content.ts @@ -29,6 +29,7 @@ let sponsorVideoID: VideoID = null; // List of open skip notices const skipNotices: SkipNotice[] = []; let activeSkipKeybindElement: ToggleSkippable = null; +let lastPOISkip = 0; // JSON video info let videoInfo: VideoInfo = null; @@ -602,7 +603,9 @@ function setupVideoListeners() { getCategoryActionType(segment.category) === CategoryActionType.POI && video.currentTime - segment.segment[0] > 0 && video.currentTime - segment.segment[0] < previewBar.getMinimumSize(true)); - if (currentPoiSegment && !skipNotices.some((notice) => notice.segments.some((s) => s.UUID === currentPoiSegment.UUID))) { + if (currentPoiSegment && lastPOISkip < Date.now() - 3000 + && !skipNotices.some((notice) => notice.segments.some((s) => s.UUID === currentPoiSegment.UUID))) { + lastPOISkip = Date.now(); skipToTime({ v: video, skipTime: currentPoiSegment.segment,