Reputation: 1625
I have a "*.caf" file, I can play it, but I need progress of playing, and jump to any position of music track. How to implement it?
Upvotes: 1
Views: 160
Reputation: 5005
AVAudioPlayer has property currentTime which can be use either for picking position
- (Float32)getProgressValue:(NSString*)section { return backgroundMusicPlayer.currentTime; }
or setting position
- (void) progressMusic:(Float32)progressMusic { [backgroundMusicPlayer setCurrentTime:progressMusic]; }
then u can easily implement progress bar or UI Slider according this values.
Upvotes: 2