简体   繁体   English

在iPhone上直播

[英]Live streaming on iPhone

I just started work on live streaming on iPhone. 我刚刚开始在iPhone上进行实时流式传输。 So any help of how to do live streming in iPhone. 因此,有关如何在iPhone中进行实时播种的任何帮助。 I think if I can add video tag in HTML5 and then load that html in UIWebView will work. 我认为,如果我可以在HTML5中添加视频标签,然后在UIWebView中加载该html,那么它将起作用。 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. 我想在应用程序中嵌入一些新闻频道实时流媒体链接,以便从那里可以找到那些链接。

您必须阅读Apple提供的HTTP Live流文档,其中有一些示例实时流URL,文件扩展名为.m3u8。如果要配置自己的Web服务器,则必须在Web服务器中配置FFMPEG服务器。这将为您提供帮助1) Apple文档 2) stackoverflow 3) stackoverflow 4) stackoverflow

If you're making a web app in html5 then the video tag is a good choice. 如果您要使用html5制作网络应用,那么video标签是一个不错的选择。

But, If you're developing a native app then MPMoviePlayerController would be a much better choice. 但是,如果您正在开发本机应用程序,那么MPMoviePlayerController将是一个更好的选择。 There are many example of how to use it online. 有很多在线使用示例。

iOS doesn't support RTMP or RSTP, so your stream would need to be a HTTP Live stream. iOS不支持RTMP或RSTP,因此您的流必须是HTTP Live流。 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. 从内存来看,编解码器的选择也非常有限,例如,如果您提供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)的视频流通常会受到国际版权法的保护,因此,除非您事先获得在其应用中使用他们的视频流的许可,否则您可能违反了法律。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM