Always set set seek mode to accurate
This commit is contained in:
1 parent
56351035c6
commit
c96f4605d7
7 files changed
+10
-10
No files matched your search
@@ -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
|
||||
|
||||
|
||||
@@ -49,7 +49,6 @@ namespace SponsorBlock
|
||||
end if
|
||||
|
||||
m.skipSegments = skipSegments
|
||||
m.top.seekMode = "accurate"
|
||||
|
||||
barPath = info.data.barPath
|
||||
if barPath <> invalid
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<field id="position" type="float" alwaysNotify="true" />
|
||||
<field id="duration" type="float" />
|
||||
<field id="autoplayAfterSeek" type="boolean" value="true" />
|
||||
<field id="seekMode" type="string" value="default" />
|
||||
<field id="content" type="node" />
|
||||
<field id="thumbnailTiles" type="assocarray" />
|
||||
<field id="playbackSpeed" type="float" value="1.0" />
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user