Hello, currently I'm using the time binding of the VideoPlayer to implement seeking functionality.
func skipForward() {
currentTime = currentTime + CMTime(seconds: 15.0, preferredTimescale: currentTime.timescale)
}
Where currentTime is a @Binding var currentTime: CMTime = .zero and is passed to the initializer of the VideoPlayer as time: $currentTime.
My question is, what would it take to expose the underlying seekTo methods instead?
I'm having some glitches with the current implementation. For example, if I try to seek forward 15 seconds while the video has less than 15 seconds remaining, then sometimes my onPlayToEndTime is not called and the video resets to end - 15 seconds mark. I suspect this might be due to directly changing the currentTime instead of using the seek APIs.
Hello, currently I'm using the
timebinding of the VideoPlayer to implement seeking functionality.Where
currentTimeis a@Binding var currentTime: CMTime = .zeroand is passed to the initializer of theVideoPlayerastime: $currentTime.My question is, what would it take to expose the underlying
seekTomethods instead?I'm having some glitches with the current implementation. For example, if I try to seek forward 15 seconds while the video has less than 15 seconds remaining, then sometimes my
onPlayToEndTimeis not called and the video resets toend - 15 secondsmark. I suspect this might be due to directly changing the currentTime instead of using the seek APIs.