mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-12 14:37:23 +03:00
Use current video time if performance.now is restricted (fingerprinting)
This commit is contained in:
@@ -538,9 +538,9 @@ function startSponsorSchedule(includeIntersectingSegments = false, currentTime?:
|
|||||||
currentSkipInterval = setInterval(() => {
|
currentSkipInterval = setInterval(() => {
|
||||||
const intervalDuration = performance.now() - startIntervalTime;
|
const intervalDuration = performance.now() - startIntervalTime;
|
||||||
console.log(startVideoTime + intervalDuration / 1000)
|
console.log(startVideoTime + intervalDuration / 1000)
|
||||||
if (intervalDuration >= delayTime) {
|
if (intervalDuration >= delayTime || video.currentTime >= skipTime[0]) {
|
||||||
clearInterval(currentSkipInterval);
|
clearInterval(currentSkipInterval);
|
||||||
skippingFunction(startVideoTime + intervalDuration / 1000);
|
skippingFunction(Math.max(video.currentTime, startVideoTime + intervalDuration / 1000));
|
||||||
}
|
}
|
||||||
}, 5);
|
}, 5);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user