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.