Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to create a new Hangouts on Air broadcast/stream from the API?

Is it possible to initialize a new Hangouts on Air broadcast/stream directly from the API? I'm attempting to use Hangouts on Air for my website's live broadcast system, but I don't see any API methods in the YouTube Live API that allows stream creation via Hangouts on Air (it looks like it needs a custom video source). If this isn't possible, is there a way to use a Google button to initialize the Hangout on Air, and then embed it on a webpage in real time (without having a pre-defined stream)?

I know there's live streaming protocols such as OBS, but that obviously is very intensive on a server. It's more convenient to use Google's massive infrastructure for this specific case (which I cannot talk too much about).

like image 627
afollestad Avatar asked Sep 28 '22 12:09

afollestad


2 Answers

The Google Hangouts API is separate from the YouTube Live Streaming API.

The Hangouts API documentation is available here.

From your question, it sounds like you're specifically looking to use Google's Google+ Hangout button.

From the docs:

The Hangout button lets you launch a Google+ Hangout directly from your site. When you use the button, you can set up the Hangout in a variety of configurations. For example, you can specify Hangout apps that launch along with the Hangout and setup the Hangout as a regular Hangout or a Hangout On Air.

Full On-Air API Reference here.

like image 115
JAL Avatar answered Dec 31 '22 21:12

JAL


You can use various links to create a HoA, but none will embed it on a webpage in realtime. You could, however develop a Hangout Extension that you, as the Host, would load to do this. Here are some important things for a todo list:

  1. Create a Handler for gapi.hangout.onair.onBroadcastingChanged or create a function to look for YouTubeID and react when called to...

  2. PING your special PHP/ASP/[whatever] server with the YouTubeID for the video (using gapi.hangout.onair.getYouTubeLiveId)

  3. Have your special PHP page update your special landing page via some app/server variable

Hope this helps!

like image 34
CLaFarge Avatar answered Dec 31 '22 21:12

CLaFarge