AVPlayer seekToTime does not play at correct position

前端 未结 5 1221
忘了有多久
忘了有多久 2021-01-31 03:31

I have an AVPlayer which is playing a HLS video stream. My user interface provides a row of buttons, one for each \"chapter\" in the video (the buttons are labeled \"1\", \"2\",

5条回答
  •  没有蜡笔的小新
    2021-01-31 04:01

    please use function like [player seekToTime:CMTimeMakeWithSeconds(seekTime,1)] .
    Because your tolerance value kCMTimeZero will take more time to seek.Instead of using tolerance value of kCMTimeZero you can use kCMTimeIndefinite which is equivalent the function that i specified earlier.

提交回复
热议问题