How to get paused audio time in iOS?

I have a need to get audio time after device reboot. If I pause an audio and after rebooting the device, and after I continue playback the paused audio.
Now, my problem is - how can I get the total time, I use this code:

CMTime myAudioTime = self.audioPlayer.currentTime
[self.audioPlayer seekToTime:myAudioTime];

but the above code is not working.
Please tell me how can I do it..!

Last updated:3/31/2016 12:12:45 AM

0 Answers