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).
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.
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:
Create a Handler for gapi.hangout.onair.onBroadcastingChanged or create a function to look for YouTubeID and react when called to...
PING your special PHP/ASP/[whatever] server with the YouTubeID for the video (using gapi.hangout.onair.getYouTubeLiveId)
Hope this helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With