Unable to retrieve Shoutcast .pls stream

I’m trying to get a .pls stream from a shoutcast server to play in my ios app. So far i’ve been unsuccessful. I’ve red a lot of posts on stackoverflow but non of these were of any help.

Can anyone please explain to me, if its even possible, how to get .pls to stream?

all you need is to list the port of you radio, here is one working example: in – (void)viewDidLoad

NSURL *vibes = [NSURL URLWithString:@"http://website.com:8002"];
vPlayer = [[AVPlayer alloc] initWithURL:vibes];
self.myViewVolume = [[MPVolumeView alloc] initWithFrame:CGRectMake(20, 330, 280, 50)];
[self.myViewVolume sizeToFit];
[self.view addSubview:self.myViewVolume];

you need to create an instance of AVPlayer in your .m file , here it is vPlayer do not forget to add AVFoundation framework to you project, you can play and stop the stream with [player play] and [player stop]

One problem with AVPlayer is the lack of easy volume control, you can add one with mpViewVolume. I am also working on radio app and by far AVPlayer is the best to play shoutcast streams.

Hello, buddy!责编内容来自:Hello, buddy! (源链) | 更多关于

本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 移动开发 » Unable to retrieve Shoutcast .pls stream

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录