Programmar The SE Programmar The SE - 4 months ago 17
HTML Question

google+ hangout OnAir button Html tag

I got html button tags for normal hangouts but i didn't get any hangout button html tag for OnAir.

i am using the below tag, but i am unable to get onair button.


<script src="https://apis.google.com/js/platform.js" async defer></script>
<div class="g-hangout" data-render="createhangout" type="onair"></div>


Can anyone get me the exact html code for onair google+ hangout?

<script src="https://apis.google.com/js/platform.js" async defer></script>
<div id="placeholder-div5"></div>
<script>
gapi.hangout.render('placeholder-div5', {
'topic': 'cats',
'render': 'createhangout',
'hangout_type': 'onair',
'initial_apps': [{'app_id' : '184219133185', 'start_data' : 'dQw4w9WgXcQ', 'app_type' : 'ROOM_APP' }],
'widget_size': 72
});
</script>


After refresh the page, I got blank page.

Answer
  • Check your browser console you might be getting

Uncaught ReferenceError: gapi is not defined

this error for sure which can sorted out if you add a script along with platform.js here's the script.

<script src="https://apis.google.com/js/client:plusone.js" type="text/javascript"></script>
Comments