Search code examples
iphonexcodesafariaudio-streaminginternet-radio

iPhone : Simple Radio App


i am made a simple radio app which call out safari to stream audio/radio. My problem is that i don't konw how to get back control and show other content while safari is playing music. Of course i do not want the user to have to get out of the app and re-enter. I am thinking a tabbed app but i need your help to regain control.

NSURL *url = [NSURL URLWithString:@"http://www.piratefm.gr/128.m3u"];
NSURLRequest *req = [NSURLRequest requestWithURL:url];
[webView loadRequest:req];
[super viewDidLoad];

Solution

  • Use an AVAudioPlayer and init it with the URL