YouTube live on iOS?

Stefan Kendall picture Stefan Kendall · Sep 6, 2015 · Viewed 7k times · Source

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?

Answer

JAL picture JAL · Sep 6, 2015

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.