xcode 在 iPhone 上直播

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5617830/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 20:46:45  来源:igfitidea点击:

Live streaming on iPhone

iphoneobjective-cxcodeiphone-sdk-3.0streaming

提问by Iqbal Khan

I just started work on live streaming on iPhone. So any help of how to do live streming in iPhone. I think if I can add video tag in HTML5 and then load that html in UIWebView will work. Am I right? If not what is your sugestion to do live streaming. I want to embed some news channel live streaming link in the application so from where I can find those links.

我刚刚开始在 iPhone 上进行直播。因此,有关如何在 iPhone 中进行现场串流的任何帮助。我想如果我可以在 HTML5 中添加视频标签,然后在 UIWebView 中加载该 html 将工作。我对吗?如果不是,您对直播的建议是什么。我想在应用程序中嵌入一些新闻频道直播链接,以便从哪里可以找到这些链接。

回答by senthilMuthu

You have to go through HTTP Live streaming document provided by Apple.There are some sample live streaming URLs.The file extension will be .m3u8.If you want to configure your own webwserver , you have to configure FFMPEG server in your webserver.The links which will help you 1)Apple document2)stackoverflow3)stackoverflow4)stackoverflow

您必须通过Apple提供的HTTP Live流媒体文件。有一些示例直播流网址。文件扩展名将是.m3u8。如果您想配置自己的网络服务器,则必须在您的网络服务器中配置FFMPEG服务器。链接这将帮助您 1)Apple 文档2)stackoverflow3)stackoverflow4)stackoverflow

回答by Twelve47

If you're making a web app in html5 then the video tag is a good choice.

如果您正在 html5 中制作网络应用程序,那么视频标签是一个不错的选择。

But, If you're developing a native app then MPMoviePlayerController would be a much better choice. There are many example of how to use it online.

但是,如果您正在开发本机应用程序,那么 MPMoviePlayerController 将是更好的选择。网上有很多关于如何使用它的例子。

iOS doesn't support RTMP or RSTP, so your stream would need to be a HTTP Live stream. From memory the codec choice is very limited too, eg if you supply H264+mp3 you won't get any sound despite iOS supporting mp3.

iOS 不支持 RTMP 或 RSTP,因此您的流需要是 HTTP 实时流。从内存中看,编解码器的选择也非常有限,例如,如果您提供 H264+mp3,尽管 iOS 支持 mp3,但您将听不到任何声音。

Also remember that streams from other people (such as the BBC) will normally be protected by international copyright law, so unless you have prior permission to use their stream in your app you may be breaking the law.

另请记住,来自其他人(例如 BBC)的流通常受国际版权法保护,因此除非您事先获得在您的应用程序中使用他们的流的许可,否则您可能会触犯法律。

回答by rckoenes

Apple has some nice resources on Http Live Streaming.

Apple 在Http Live Streaming上有一些不错的资源。