开发者

How to play .pls playlist url with MPMusicPlayerController

开发者 https://www.devze.com 2023-03-25 09:59 出处:网络
I have a live radio streaming playlist url, when I open that url in UIWebView, the app automatically opens a player looks like MPMoviePlayer, not sure what player it is, but it plays iPod with the str

I have a live radio streaming playlist url, when I open that url in UIWebView, the app automatically opens a player looks like MPMoviePlayer, not sure what player it is, but it plays iPod with the streaming. I was able to set volume up/down with [[MPMusicPlayerController iPodMusicPl开发者_高级运维ayer] setVolume:volume];

I wanted to do all with MPMusicPlayerController so that I can control the streaming in my app. I tried creating MPMediaItemCollection with the URL and set it to the MusicController, but it didn't work.

Any Help would be appreciated.

Thanks.


first parse the .pls file then play it.

Have a look at https://github.com/drodriguez/globradio/blob/master/Classes/RRQPLSParser.m for parsing, and at the entire project for playing.

To play a streaming audio, however, this project is more recent: https://github.com/mattgallagher/AudioStreamer

Hope this helps.

0

精彩评论

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

关注公众号