"Start a Hangout on Air" button for Youtube LiveStreaming API
Asked Answered
G

1

16

We've been using the as yet un-deprecated "Start a Hangout on Air" button:

https://developers.google.com/+/hangouts/button

to start hangouts on air on our site http://agileventures.org for several years now. Full source code at http://github.com/AgileVentures/WebsiteOne

In the last 24 hours, clicking those buttons now redirects to instructions to manually start a youtube live event:

https://support.google.com/youtube/answer/7083786?visit_id=1-636118907663120157-3101666316&p=live_hoa&hl=en&rd=1

This is a problem as manually started events will not create the hangout app that lets our community know an event is starting and provides us with important telemetry on events.

There is unfortunately no documentation in the youtube live streaming API about how to create a button that will create a youtube live streaming event, or load a plugin into that event:

https://developers.google.com/youtube/v3/live/docs/

We need some code similar to that provided by the hangouts api, e.g.

<script src="https://apis.google.com/js/platform.js" async defer>
</script> 
<div class="g-hangout" data-render="createhangout"
     data-initial_apps="[{ app_id : '123456789012', start_data : 'dQw4w9WgXcQ', 'app_type' : 'ROOM_APP' }]"> 
 </div>

but that will work with the new youtube streaming api. Any ideas?

The YouTube live documentation talks about being able to create a broadcast, but it seems to be only for custom "streaming" broadcasts and not hangouts:

https://developers.google.com/youtube/v3/live/docs/liveBroadcasts/insert

The new events page allows us to select the "quick" type, which creates a hangout on air (https://www.youtube.com/my_live_events?action_create_live_event=1) so we can create HOAs manually, but not programmatically? We would very much appreciate clarity from Google on this.

It seems that support for Hangout on Air Buttons, creation of HOAs via API has been dropped no?

Note that Google is specifically requesting support questions for the Youtube LiveStream API are posted to StackOverflow:

https://developers.google.com/youtube/v3/live/support

Garlic answered 25/10, 2016 at 7:2 Comment(6)
related discussion at productforums.google.com/forum/#!topic/youtube/bww-BpJGAMQGarlic
comment from stackoverflow.com/users/1836865/raphael-krausz github.com/AgileVentures/HangoutConnection/blob/develop/lib/… - around line 46 The String (JSON data) being returned by gapi.hangout.getStartData() no longer returning the expected result, so certain calls to that data is resulting in a null exceptions Line 49 of the codeGarlic
More details of issue productforums.google.com/d/msg/hangouts/qGWPcxFHU7Q/…Unhand
thanks @Unhand much appreciatedGarlic
I was just writing a blog post about this issue, and to get screen shots I clicked our Hangout on Air button and everything started up perfectly fine - maybe google engineers made some changes???Garlic
Related post: Is it possible to create event of type “Quick (using Google Hangouts On Air)” using YouTube Live Streaming APISleep
G
0

The functionality all started working again after a 3 week break. We're not sure if Google changed anything. There were no changes on our end. Buttons for starting HOA's have been stable now for the last two months or so ...

Garlic answered 16/1, 2017 at 15:6 Comment(1)
Does it still work? As all the hangouts docs says the the apis have been sunsettedPuerilism

© 2022 - 2024 — McMap. All rights reserved.