YouTube live on iOS?

时光毁灭记忆、已成空白 提交于 2019-12-03 03:17:57

问题


The docs are a little hard to parse here. I was wondering if there was any way to

  1. Stream YouTube live into an iOS app, without significant/any YouTube branding.
  2. Stream from an iOS device as a broadcast stream for YouTube live.

My initial Googling turned up mixed responses. I was hoping to see an example of this if it's possible, or save myself some time if it's not.

Suppose I have a person on ATT next to a person on Verizon streaming content, and I want to make both appear as a single uninterrupted stream switching back and forth. Does YouTube or a library do to anything to facilitate this?


回答1:


Streaming from an iOS device is no different than streaming from any other device. You would have to write an h264 encoder and RTMP packetizer, and send the video to your YouTube stream object's ingestionAddress. Outlining the details of the encoder beyond the above is too broad for Stack Overflow, but I highly recommend looking at the VideoCore iOS project.

As far as branding goes, the only way to play back YouTube content in an iOS app without breaking YouTube's terms of service is to play the video in a UIWebView or YouTube's iOS player helper library (which is just a web view with some playback interfaces).

There is no way to completely remove YouTube branding from the IFrame player. However, there are branding options you can toggle using the modestBranding flag on the player. See the IFrame docs here.



来源:https://stackoverflow.com/questions/32418343/youtube-live-on-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!