mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-08-31 13:08:15 +00:00
Lift the 120s cap on Disney+ relative-seek so large seeks reach target
Disney+ has no absolute seek on its blob <video>, so absolute seeks are translated into repeated clicks of the player's relative skip button. The click count was capped at 12 (=120s at 10s/step), so any seek further than two minutes away silently landed short — breaking absolute-position sync (e.g. syncing to 5:00 from far away never arrived). Derive the step size from the matched button's own label (10s default, some UIs use 5/15/30) and issue enough clicks to cover the full delta, bounded at a sane maximum. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -240,7 +240,14 @@
|
|||||||
}
|
}
|
||||||
// Disney's scrubber aria-valuenow can lag several seconds behind
|
// Disney's scrubber aria-valuenow can lag several seconds behind
|
||||||
// real playback; a "time remaining" indicator updates live, so
|
// real playback; a "time remaining" indicator updates live, so
|
||||||
// capture it and later derive current = duration - remaining.
|
// capture it and later derive current = duration - remaining.
|
||||||
|
const remClass = String(node.getAttribute?.('class') || '') + ' ' + String(node.getAttribute?.('data-testid') || '');
|
||||||
|
if (/remain/i.test(remClass)) {
|
||||||
|
const remMatch = String(node.textContent || '').match(/\d{1,3}:\d{2}(?::\d{2})?/);
|
||||||
|
const rem = remMatch ? parseClockTime(remMatch[0]) : null;
|
||||||
|
if (Number.isFinite(rem) && rem >= 0) remainingSeconds = rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (best && remainingSeconds !== null && best.duration > 0) {
|
if (best && remainingSeconds !== null && best.duration > 0) {
|
||||||
const liveCurrent = best.duration - remainingSeconds;
|
const liveCurrent = best.duration - remainingSeconds;
|
||||||
|
|||||||
Reference in New Issue
Block a user