AVQueuePlayer SeekToTime

124 views Asked by At
[queuePlayer seekToTime:CMTimeMake(time,1)];

While I take seekToTime, the audio does replay, not seek to the time. How to create CMTime para or you can tell me how to do all.

1

There are 1 answers

1
aaron On

Please try below code:

UISlider *s = (UISlider*)sender;
[appDelegate.queuePlayer seekToTime:CMTimeMakeWithSeconds(s.value, queuePlayer.currentTime.timescale)];

first para is progress (0-1.0) second para like this 'queuePlayer.currentTime.timescale'