Skip to content

Commit 6452462

Browse files
authored
iOS Lock Screen Skip Fix Update (bluefireteam#812)
* Fix iOS Lockscreen Skip Intervals * Param in Millis Not Seconds
1 parent 0b26cf0 commit 6452462

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

darwin/Classes/WrappedMediaPlayer.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ class WrappedMediaPlayer {
140140
log("Cannot skip forward, unable to determine maxDuration")
141141
return
142142
}
143-
let newTime = CMTimeAdd(currentTime, toCMTime(seconds: interval))
144-
143+
let newTime = CMTimeAdd(currentTime, toCMTime(millis: interval * 1000))
145144
// if CMTime is more than max duration, limit it
146145
let clampedTime = CMTimeGetSeconds(newTime) > CMTimeGetSeconds(maxDuration) ? maxDuration : newTime
147146
seek(time: clampedTime)
@@ -152,11 +151,9 @@ class WrappedMediaPlayer {
152151
log("Cannot skip forward, unable to determine currentTime")
153152
return
154153
}
155-
156-
let newTime = CMTimeSubtract(currentTime, toCMTime(seconds: interval))
154+
let newTime = CMTimeSubtract(currentTime, toCMTime(millis: interval * 1000))
157155
// if CMTime is negative, set it to zero
158156
let clampedTime = CMTimeGetSeconds(newTime) < 0 ? toCMTime(millis: 0) : newTime
159-
160157
seek(time: clampedTime)
161158
}
162159

0 commit comments

Comments
 (0)