Evans Kakpovi
Evans Kakpovi

Reputation: 312

I'm trying to stream the following url in ios but it won't play

the audio i want to stream is:http://streamer2.ultapulta.com:8001

I've tried other streaming links and they work in my code.

NSURL *url = [NSURL URLWithString:streamUrl];

_myItem = [AVPlayerItem playerItemWithURL:url];
_mySound = [AVPlayer playerWithPlayerItem:_myItem];

[_mySound play]

I believe the stream is in AAC format. What should I do

Upvotes: 0

Views: 307

Answers (1)

Alexander Zimin
Alexander Zimin

Reputation: 1710

You could try to use StreamingKit

Example like in documentation:

STKAudioPlayer* audioPlayer = [[STKAudioPlayer alloc] init];
[audioPlayer queue:@"http://streamer2.ultapulta.com:8001"];

And it's better to have audioPlayer as class property.

Upvotes: 1

Related Questions