iPhone:简单的收音机应用 [英] iPhone : Simple Radio App

查看:66
本文介绍了iPhone:简单的收音机应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我制作了一个简单的无线电应用程序,可以调用野生动物园以流式传输音频/广播.我的问题是在野生动物园播放音乐时,我不知道如何获得控制权并显示其他内容.当然,我不希望用户必须退出应用程序并重新输入.我正在考虑使用选项卡式应用程序,但需要您的帮助才能重新获得控制权.

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];

推荐答案

使用AVAudioPlayer并通过URL对其进行初始化

Use an AVAudioPlayer and init it with the URL

这篇关于iPhone:简单的收音机应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆