mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-07-26 12:08:15 +00:00
Fix Disney+ force sync, seek, and HCM regressions for v2.5.3
The v2.5.2 Disney+ page-API integration leaked blob-relative <video> time into force sync, seeks, and heartbeats when the page-API bridge had no fresh data, so force sync on Disney+ appeared broken. - getSyncCurrentTime/getSyncDuration now refuse native values on Disney+ (return null/0) so stale bridge data degrades to a clean no-op instead of broadcasting garbage to peers. The get_current_time handler and episode/lobby/hcmIsLive paths are routed through the same accessor. - Validate FORCE_SYNC_PREPARE/SEEK payloads as finite before relaying; the internal coercion no longer treats '' as 0. - Stop double-routing FORCE_SYNC_PREPARE from the popup path (the generic popup route now covers only play/pause/seek). - popup force-sync: exclude null/empty peer times from the jump-to-others median (Number(null)===0 was dragging the target to 0), guard against NaN end-to-end, clear the dangling reset timer on failure, and retry without re-injecting when the content script responds but the Disney+ bridge has not yet delivered a finite time. - hcmIsLive skips the native-duration live signal on Disney+ only, preserving YouTube/Twitch Infinity-duration live detection. Disney-specific logic remains strictly gated to disneyplus.com; no Netflix/YouTube/Twitch/generic path is affected.
This commit is contained in:
@@ -122,6 +122,10 @@ const disneyVideo = makeVideo('disney-offset', 1920, 1080, {
|
||||
assert.equal(disneyFns.getSyncCurrentTime(disneyVideo), 9);
|
||||
assert.equal(disneyFns.getSyncDuration(disneyVideo), 10800);
|
||||
assert.equal(disneyFns.toNativeSeekTime(disneyVideo, 39), 39);
|
||||
assert.equal(disneyFns.getSyncCurrentTime(makeVideo('disney-native-broken', 1920, 1080, {
|
||||
currentTime: Number.NaN,
|
||||
duration: 0
|
||||
})), 9);
|
||||
|
||||
const disneyNoPageApiFns = loadTimelineFns('www.disneyplus.com');
|
||||
const disneyOffsetVideo = makeVideo('disney-offset', 1920, 1080, {
|
||||
@@ -129,7 +133,7 @@ const disneyOffsetVideo = makeVideo('disney-offset', 1920, 1080, {
|
||||
duration: 0,
|
||||
seekable: makeSeekable([[20, 10820]])
|
||||
});
|
||||
assert.equal(disneyNoPageApiFns.getSyncCurrentTime(disneyOffsetVideo), 29);
|
||||
assert.equal(disneyNoPageApiFns.getSyncCurrentTime(disneyOffsetVideo), null);
|
||||
assert.equal(disneyNoPageApiFns.getSyncDuration(disneyOffsetVideo), 0);
|
||||
assert.equal(disneyNoPageApiFns.toNativeSeekTime(disneyOffsetVideo, 39), 39);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user