How to play a playlist with music files in application?
How to play a playlist with music files in application rather than in ipod lib开发者_Go百科rary? I want to use MPMusicPlayerController but it can only play musics from library, any suggestions except AVAudioPlayer? And does any one know how to change the icon shown below? like music downloader or pandora? I appreciate for any suggestion.
To change the icon above you only have to register your application for remote control events as -
if([[UIApplication sharedApplication] respondsToSelector:@selector(beginReceivingRemoteControlEvents)])
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
and for handling these events look here (one solution is subclass UIWindow) -
iOS 4: Remote controls for background audio
and if you wan t to play music from streaming then you can use mattgallagher's audio streamer class, here is the link of github repo -
https://github.com/mattgallagher/AudioStreamer/blob/df17f971a2f8d482346400c9bb30d1b5d819baba/Classes/iPhoneStreamingPlayerViewController.h
精彩评论