Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels