How can I implement YouTube LiveStream player in iOS and android?

两盒软妹~` 提交于 2019-12-12 04:59:39

问题


I want to implement a simple livestream to my iOS and android apps. I can use youtube.com to record the livestream, and broadcast it as a regular video in my apps. I don't want to implement heavy SDKs or build a platform to do so.

What is the best choice?

Have come across - kickflip.io, livestreamsdk.com, ustream.tv, etc. With the first 2, you have to setup the whole thing. While I was thinking if I can simply embed like a Youtube player which will show the broadcast.


回答1:


The YouTube Live Streaming API lets you create, update and manage live events on YouTube. The Live Streaming API is actually comprised of components of the YouTube Data API and the YouTube Content ID API.

Before you start:

  1. You need a Google Account to access the Google Developers Console, request an API key and register your app.

  2. Register your app https://developers.google.com/youtube/registering_an_application with Google so that it can submit API request.

  3. After registering your app, select the YouTube Data API as one of the services that your app uses.

Here's a demo app which shows how to use liveBroadcasts, liveBroadcast is a resource represents an event that will streamed via live video on YouTube: https://github.com/youtube/api-samples/blob/master/python/create_broadcast.py




回答2:


Made a way out using Youtube Player. Tried both using youtube embed in webview and youtube player using SDK, and it worked just fine. Some manual controls were required to be added to better handle for the live streaming purpose, but the rest worked smooth. Used Wirecast for streaming the media (broadcasting) to Youtube, and youtube's rtmp handles the rest nearly.



来源:https://stackoverflow.com/questions/37269595/how-can-i-implement-youtube-livestream-player-in-ios-and-android

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