I made an app which provides you to listen to a streamed radio. I don't know how it's possible to integrate AirPlay in my app?
This is the code to let it play:
-(IBAction)play {
if(clicked == 0) {
clicked = 1;
NSURL *url = [NSURL URLWithString:@"http://stream.domain.com/high.mp3"];
audioPlayer = [[AVPlayer alloc] initWithURL:url];
[audioPlayer play];
[start setTitle:@"Stop" forState:UIControlStateNormal];
}
else {
[audioPlayer pause];
clicked = 0;
[start setTitle:@"Start" forState:UIControlStateNormal];
}
}
What do I need to add to let AirPlay share this?