Failed to get Stream Shoutcast.pls

I am trying to get .pls stream from server screams to play in my ios application. So far, I have not been successful. I blushed a lot of posts about stackoverflow, but not about that under any circumstances.

Can someone explain to me, if possible, how to get .pls for a stream?

+4
source share
2 answers

all you need is to list the port of your 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 the AVFoundation project to the project, you can play and stop the stream using [play player] and [stop player]

One of the problems with AVPlayer is the lack of easy volume control, you can add it using mpViewVolume. I am also working on a radio application, and by far, AVPlayer is best played in screaming streams.

+7
source

@Walid Hussain he worked for me using AVPlayer

link to AVFoundation.framework

 //import needed #import <AVFoundation/AVFoundation.h> // declaration for the player AVPlayer * radioPlayer; // play NSURL * url = [NSURL URLWithString:@"http://energy10.egihosting.com:9636"]; radioPlayer = [[AVPlayer playerWithURL:url] retain]; [radioPlayer play]; 
+2
source

Source: https://habr.com/ru/post/1447583/


All Articles