如何在应用程序中播放包含音乐文件的播放列表?
如何在应用程序中而不是在 iPod 库中播放包含音乐文件的播放列表?我想使用 MPMusicPlayerController 但它只能播放库中的音乐,除了 AVAudioPlayer 之外还有什么建议吗?有谁知道如何更改下面显示的图标?像音乐下载器或潘多拉?我很感激任何建议。
How to play a playlist with music files in application rather than in ipod library? 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要更改上面的图标,您只需将远程控制事件的应用程序注册为 -
处理这些事件请查看此处(一种解决方案是 UIWindow 子类) -
iOS 4:背景音频的远程控制
,如果你想从流媒体播放音乐,那么你可以使用 mattgallagher 的音频流媒体类,在这里是 github repo 的链接 -
https://github.com/mattgallagher/AudioStreamer/blob/df17f971a2f8d482346400c9bb30d1b5d819baba/Classes/iPhoneStreamingPlayerViewController.h
To change the icon above you only have to register your application for remote control events as -
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