From c96f4605d7b8082097d9e6d6d5860d810561a81f Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Fri, 20 Nov 2026 21:18:23 -0500 Subject: [PATCH] Always set set seek mode to `accurate` --- CHANGELOG.md | 1 + playlet-lib/src/components/VideoPlayer/SponsorBlock.bs | 1 - playlet-lib/src/components/VideoPlayer/VideoPlayer.bs | 1 + .../components/VideoPlayerDev/SponsorBlockController.bs | 7 ++----- .../src/components/VideoPlayerDev/VideoPlayerDev.bs | 5 +++-- .../components/VideoPlayerDev/tests/VideoPlayerDevMock.xml | 1 + .../tests/VideoPlayerDev/SponsorBlockController.spec.bs | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d210964a..bab59daa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - DRM playback errors on certain TVs, by filtering out FairPlay-only streams - Player seek bar and backdrop missing on some devices - Missing titles in shorts +- Always set set seek mode to `accurate` ## [0.48.10] - 2026-10-17 diff --git a/playlet-lib/src/components/VideoPlayer/SponsorBlock.bs b/playlet-lib/src/components/VideoPlayer/SponsorBlock.bs index 5da304db..efd327b4 100644 --- a/playlet-lib/src/components/VideoPlayer/SponsorBlock.bs +++ b/playlet-lib/src/components/VideoPlayer/SponsorBlock.bs @@ -49,7 +49,6 @@ namespace SponsorBlock end if m.skipSegments = skipSegments - m.top.seekMode = "accurate" barPath = info.data.barPath if barPath <> invalid diff --git a/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs b/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs index 67fa21cb..2ee790af 100644 --- a/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs +++ b/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs @@ -36,6 +36,7 @@ function Init() m.trickplayUITimer = m.top.findNode("trickplayUITimer") m.trickplayUITimer.ObserveField("fire", FuncName(OnTrickplayUITimer)) m.top.notificationInterval = 1 + m.top.seekMode = "accurate" ' videoPlayingSuccess indicates if we started playing a video successfully ' We use it to detect if we should try another link for a video, or if another error diff --git a/playlet-lib/src/components/VideoPlayerDev/SponsorBlockController.bs b/playlet-lib/src/components/VideoPlayerDev/SponsorBlockController.bs index a2ab6a15..42d54d28 100644 --- a/playlet-lib/src/components/VideoPlayerDev/SponsorBlockController.bs +++ b/playlet-lib/src/components/VideoPlayerDev/SponsorBlockController.bs @@ -26,7 +26,7 @@ namespace SponsorBlockController const SEEK_ECHO_SLACK_MS = 100 class Controller - ' deps the coordinator owns; top = the Video node (seekMode + duration). + ' deps the coordinator owns; top = the Video node (duration). private jobQueue as object = invalid private preferences as object = invalid private notifications as object = invalid @@ -77,7 +77,7 @@ namespace SponsorBlockController } end function - ' Store the segments and set seekMode=accurate on the Video node. + ' Store the segments. function OnSegmentsJobDone(event as object) as void info = event.getInfo() if not info.success @@ -89,9 +89,6 @@ namespace SponsorBlockController end if m.segments = segments m.timeline = info.data.timeline - if m.top <> invalid - m.top.seekMode = "accurate" - end if LogDebug("segments ready:", segments.Count()) end function diff --git a/playlet-lib/src/components/VideoPlayerDev/VideoPlayerDev.bs b/playlet-lib/src/components/VideoPlayerDev/VideoPlayerDev.bs index d891a8d4..58c038c2 100644 --- a/playlet-lib/src/components/VideoPlayerDev/VideoPlayerDev.bs +++ b/playlet-lib/src/components/VideoPlayerDev/VideoPlayerDev.bs @@ -40,6 +40,7 @@ end enum ' one component scope; this file is shared with the test mock (tests/VideoPlayerDevMock). function Initialize() m.top.notificationInterval = 1 + m.top.seekMode = "accurate" m.transport = new TransportController.Controller() m.playbackTelemetry = new PlaybackTelemetry.Recorder({ @@ -1223,8 +1224,8 @@ function OnVideoContentJobDone(event as object) as void MarkVideoWatched(content.videoId, metadata.playbackTrackingUrls, metadata.cpn) end function -' The coordinator-owned SB job callback (node scope). Hands the result to the controller (it stores segments + -' sets seekMode), then pushes the bar tint fields when segments exist. +' The coordinator-owned SB job callback (node scope). Hands the result to the controller (it stores segments), +' then pushes the bar tint fields when segments exist. function OnSponsorBlockSegmentsJobDone(event as object) as void JobSystem.UnobserveCallback(event.getRoSGNode()) m.sponsorBlockSegmentsJob = invalid diff --git a/playlet-lib/src/components/VideoPlayerDev/tests/VideoPlayerDevMock.xml b/playlet-lib/src/components/VideoPlayerDev/tests/VideoPlayerDevMock.xml index 92c4a844..c067934c 100644 --- a/playlet-lib/src/components/VideoPlayerDev/tests/VideoPlayerDevMock.xml +++ b/playlet-lib/src/components/VideoPlayerDev/tests/VideoPlayerDevMock.xml @@ -13,6 +13,7 @@ + diff --git a/playlet-lib/src/source/tests/VideoPlayerDev/SponsorBlockController.spec.bs b/playlet-lib/src/source/tests/VideoPlayerDev/SponsorBlockController.spec.bs index 1b07ccbb..d4dee59d 100644 --- a/playlet-lib/src/source/tests/VideoPlayerDev/SponsorBlockController.spec.bs +++ b/playlet-lib/src/source/tests/VideoPlayerDev/SponsorBlockController.spec.bs @@ -10,8 +10,8 @@ namespace Tests class SponsorBlockControllerTests extends Rooibos.BaseTestSuite protected override function beforeEach() - ' a fake Video node: only `duration` (seconds) + `seekMode` are read/written by the controller. - m.fakeTop = { duration: 282.0, seekMode: "default" } + ' a fake Video node: only `duration` (seconds) is read by the controller. + m.fakeTop = { duration: 282.0 } m.sb = new SponsorBlockController.Controller({ jobQueue: invalid preferences: invalid