I’m developing a music application that plays music from the iPhone’s custom music library, and I'm having trouble deciding which audio player is right for it (AVAudioPlayer, AVPlayer or MPMusicPlayer).
My application needs to do the following:
- Play music from your iPhone music library
- Controlling the music volume of the application separately from the volume of the device / system
- Continue playing the music of the application when the application moves to the background.
- Catch events when a song moves on to the next song or ends.
From my research, it seems that each of the three sound players mentioned above does SOME tasks required for my application, but none of them does ALL. AVPlayer seems to be the closest, except that its volume depends on the volume of the device / system.
Does anyone have any recommendations or workarounds for this? I have been waving this brain for quite some time, so any help would be greatly appreciated.
source
share