2

Is there a way to start an "On Air" hangout via the API? I've got my application created and working great, however I need the hangout's embed code for my customers.

I can't seem to find any documentation on how to start a hangout like this via the hangout button. (https://developers.google.com/+/hangouts/button)

Kara
  • 6,115
  • 16
  • 50
  • 57
user1146223
  • 209
  • 4
  • 14
  • The API that is in question has shut down. For a question using modern APIs, refer to https://stackoverflow.com/q/37979700/130638 – balupton Jan 04 '19 at 06:02

3 Answers3

1

It is not currently possible to embed a hangout. With the Hangout button, though, the start screen includes the standard checkbox to make the Hangout On Air. developers.google.com/+/hangouts/button

Joanna
  • 2,176
  • 11
  • 16
0

You can embed a hangout if you broadcast the hangout "on air" on youtube at the same time.

The embed button is at the top of the hangout.

silver
  • 650
  • 4
  • 15
0

Simple add following script on your page and create app_id from google console and replace it with hash symbol.

<div id="placeholder-div"></div>

<script>
window.___gcfg = {
  lang: 'en-US'
};

(function() {
  var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
  po.src = 'https://apis.google.com/js/platform.js?onload=renderButton';
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();

function renderButton(){
  gapi.hangout.render('placeholder-div', {
      'render': 'createhangout',
      'hangout_type'  :'onair',
      'initial_apps': [
        { app_id : '############', start_data : 'dQw4w9WgXcQ', 'app_type' : 'ROOM_APP' }
      ]
    });
}
</script>
GitaarLAB
  • 14,536
  • 11
  • 60
  • 80
dev verma
  • 671
  • 1
  • 9
  • 18