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
@@ -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" />
|
||||
|
||||
Reference in new issue
Block a user