Question

how can I make AVPlayerLayer display the exact video's frame in method seekToTime.

Now [AVPlayer seekToTime:CMTimeMakeWithSeconds(CMTimeGetSeconds(A, B))], the AVPlayerLayer only displays the frame at every 1-second change for example 1.50-2.50-3.50. I want it to display frame at 4.45 second for example. Is it possible?

Était-ce utile?

La solution

You can use [AVPlayer seekToTime: toleranceBefore: toleranceAfter:] to get random media access with higher precision.
To get the highest precision possible, pass kCMTimeZero as argument for both tolerances. Note that this might add noticeable delay during seeks.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top