views:

96

answers:

1

I use AVAudioPlayer to play an mp3 file to a user within my iPhone app. This all works fine and dandy. I even update a PLAY/PAUSED button depending on the state of the player. But it would be nice to know how much longer the song will play.

So How do I show the time remaining?

+2  A: 

You can set up an NSTimer and compute audioPlayer.duration - audioPlayer.currentTime while playing.

KennyTM