Google Hangouts API: Can I start an “On Air” Hangout?

只愿长相守 提交于 2019-11-27 09:35:49

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

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.

dev verma

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>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!