I have implemented audio playback using AVPlayer, playing a remote mp3 url.
I want to display the information about the currently playing audio using the MPNowPlay
Ok - I dug through the apple dev forums and found a hint.
If you are using AVPlayer for audio only, and want it to work in the background while doing airplay, you need to disable the allowsAirPlayVideo
setting.
Apparently AVPlayer on iOS 5+ assumes that it is playing back video via AirPlay, and so does not allow backgrounding, unless you explicitly disable video AirPlay.
Once you disable this (i.e. self.player.allowsAirPlayVideo = NO;
) then your audio will still play via AirPlay, but now it will now show the audio/ipod like interface correctly.
If you're on iOS7 you've got to disable external playback :
self.player.allowsExternalPlayback = NO;