mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-11 14:07:13 +03:00
Fix seeking issues with poi segment
This commit is contained in:
@@ -29,6 +29,7 @@ let sponsorVideoID: VideoID = null;
|
|||||||
// List of open skip notices
|
// List of open skip notices
|
||||||
const skipNotices: SkipNotice[] = [];
|
const skipNotices: SkipNotice[] = [];
|
||||||
let activeSkipKeybindElement: ToggleSkippable = null;
|
let activeSkipKeybindElement: ToggleSkippable = null;
|
||||||
|
let lastPOISkip = 0;
|
||||||
|
|
||||||
// JSON video info
|
// JSON video info
|
||||||
let videoInfo: VideoInfo = null;
|
let videoInfo: VideoInfo = null;
|
||||||
@@ -602,7 +603,9 @@ function setupVideoListeners() {
|
|||||||
getCategoryActionType(segment.category) === CategoryActionType.POI &&
|
getCategoryActionType(segment.category) === CategoryActionType.POI &&
|
||||||
video.currentTime - segment.segment[0] > 0 &&
|
video.currentTime - segment.segment[0] > 0 &&
|
||||||
video.currentTime - segment.segment[0] < previewBar.getMinimumSize(true));
|
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({
|
skipToTime({
|
||||||
v: video,
|
v: video,
|
||||||
skipTime: currentPoiSegment.segment,
|
skipTime: currentPoiSegment.segment,
|
||||||
|
|||||||
Reference in New Issue
Block a user