diff --git a/playlet-lib/src/components/VideoPlayer/SponsorBlock.bs b/playlet-lib/src/components/VideoPlayer/SponsorBlock.bs index ba1f7453..5b99b983 100644 --- a/playlet-lib/src/components/VideoPlayer/SponsorBlock.bs +++ b/playlet-lib/src/components/VideoPlayer/SponsorBlock.bs @@ -127,9 +127,9 @@ namespace SponsorBlock return invalid end function - function OnPositionChangeSkipSponsorBlockSections() as void + function OnPositionChangeSkipSponsorBlockSections(event as object) as void segments = m.skipSegments - position = m.top.position + position = event.getData() segment = FindSegmentByTime(segments, position) if segment = invalid diff --git a/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs b/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs index 117d4b8c..569027b4 100644 --- a/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs +++ b/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs @@ -353,12 +353,12 @@ function MarkVideoWatched(videoId as dynamic) as void m.top.ObserveFieldScoped("position", FuncName(OnPositionChangeMarkWatchTime)) end function -function OnPositionChangeMarkWatchTime() as void +function OnPositionChangeMarkWatchTime(event as object) as void if m.markVideoWatchedTask = invalid return end if - currentPosition = m.top.position + currentPosition = event.getData() currentWatchTimeMarker = m.watchTimeMarker m.watchTimeMarker = (currentPosition \ 20) * 20 if currentWatchTimeMarker = currentPosition