mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 21:47:06 +03:00
Fix potentially leaking set interval
This commit is contained in:
@@ -684,6 +684,7 @@ async function startSponsorSchedule(includeIntersectingSegments = false, current
|
||||
const reportedVideoTimeAtStart = getVideo().currentTime;
|
||||
logDebug(`Starting setInterval skipping ${getVideo().currentTime} to skip at ${skipTime[0]}`);
|
||||
|
||||
if (currentSkipInterval !== null) clearInterval(currentSkipInterval);
|
||||
currentSkipInterval = setInterval(() => {
|
||||
// Estimate delay, but only take the current time right after a change
|
||||
// Current time remains the same for many "frames" on Firefox
|
||||
|
||||
Reference in New Issue
Block a user