Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open hangout in new tab

I've integrated a hangout button into my website. When I click it a child window is opened. Is it possible to make hangout opened in current tab or in a new tab (like a usual link does)?

I've looked through Hangout Button documentation but haven't found anything like this (while I believe I saw it somewhere over the Internet).

Update There was a couple of examples how you can specify a new hangout url without Hangout Button in the answers and comment. But no proves were provided that this is a reliable way and no documentation was provided about the ways to specify additional parameters (e. g. startDate for Hangout App).

Update 2 I've found that when you create a new hangout app Google Develope Console provides a Hangout link:

enter image description here

with the following url: https://hangoutsapi.talkgadget.google.com/hangouts?authuser=0&gid=appId. Does it work only for sandbox? Is there any way to specify other parameters like startData?

like image 628
SiberianGuy Avatar asked Oct 19 '14 00:10

SiberianGuy


People also ask

How do I create a shortcut for Hangouts?

After verifying your Hangouts version, open a conversation with a contact and tap the dots in the top right-hand corner. You will see a new option appear, called Save to Home screen. The shortcut for the conversation will appear on the home screen with your contact's photo.


2 Answers

I use the following to open hangout in a new tab

<a target="_blank" href="https://plus.google.com/hangouts/_?gid=<app_id">Start a Hangout</a>

Use the query parameter gd=somevalue to pass your app an initial set of data

https://developers.google.com/+/hangouts/running#passing-data

I send start data like this

https://plus.google.com/hangouts/_?gid=<app_id">&gd=<start_data>

and also like this

<script src="https://apis.google.com/js/platform.js" async defer></script>
<div id="placeholder-rr"></div>
<script>
  gapi.hangout.render('placeholder-rr', {
    'render': 'createhangout',
    'initial_apps': [{'app_id' : 'Your app_id', 'start_data' : 'Put your start data here', 'app_type' : 'ROOM_APP' }],
    'widget_size': 175
  });
</script>
like image 162
New to Rails Avatar answered Oct 06 '22 11:10

New to Rails


Checked the documentation, doesn't seem that the button is meant to be flexible with configuration.


If you're looking for a coding solution apart than:

  gapi.hangout.render('placeholder-div', {
    'render': 'createhangout',
    'initial_apps': [{'app_id' : '184219133185', 'start_data' : 'dQw4w9WgXcQ', 'app_type' : 'ROOM_APP' }],
    'widget_size': 200
  });

Deferred execution and language configuration:

  window.___gcfg = {
    lang: 'zh-CN',
    parsetags: 'onload'
  };

not much can be done.

On the manual side, holding ⌘ (CTRL on windows) while clicking on the button will open the hangout in a new tab instead.

Tested successfully on Chrome and Safari. Unsuccessful on Firefox.

like image 28
carlodurso Avatar answered Oct 06 '22 10:10

carlodurso