开发者

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.

How to play a playlist with music files in application?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜