mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-12 06:27:14 +03:00
Some more debug logs
This commit is contained in:
@@ -575,6 +575,8 @@ function startSponsorSchedule(includeIntersectingSegments = false, currentTime?:
|
||||
// Use interval instead of timeout near the end to combat imprecise video time
|
||||
const startIntervalTime = performance.now();
|
||||
const startVideoTime = Math.max(currentTime, video.currentTime);
|
||||
logDebug(`Starting setInterval skipping ${video.currentTime} to skip at ${skipTime[0]}`);
|
||||
|
||||
currentSkipInterval = setInterval(() => {
|
||||
const intervalDuration = performance.now() - startIntervalTime;
|
||||
if (intervalDuration >= delayTime || video.currentTime >= skipTime[0]) {
|
||||
@@ -589,6 +591,8 @@ function startSponsorSchedule(includeIntersectingSegments = false, currentTime?:
|
||||
}
|
||||
}, 1);
|
||||
} else {
|
||||
logDebug(`Starting timeout to skip ${video.currentTime} to skip at ${skipTime[0]}`);
|
||||
|
||||
// Schedule for right before to be more precise than normal timeout
|
||||
currentSkipSchedule = setTimeout(skippingFunction, Math.max(0, delayTime - 100));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user