Google+ Hangouts API

gapi.hangout.onair

Provides ability for interacting with Hangouts On Air.

Classes

Functions

Events

Enums

Classes in gapi.hangout.onair

Class Description
class AudioNotificationsDefaultMuteChangedEvent(
  areNotificationsMuted
)
An event fired when audio notifications are muted or unmuted for all new participants in a Hangout On Air.
areNotificationsMuted : boolean
Whether audio notifications are muted for all new participants. See gapi.hangout.av.setLocalAudioNotificationsMute for the types of sounds that will be muted.
class BroadcastDisplayModeChangedEvent(
  broadcastDisplayMode
)
Provides information about when to broadcast in full screen.
broadcastDisplayMode : BroadcastDisplayMode
Indicates when to broadcast in full screen.
class BroadcastingChangedEvent(
  isBroadcasting
)
Contains information about whether the Hangout is broadcasting.
isBroadcasting : boolean
Indicates whether the Hangout is broadcasting.
class DisplayedParticipantInBroadcastChangedEvent(
  displayedParticipant
)
Signals when the participant displayed in the broadcast changes.
displayedParticipant : string
Indicates the participant displayed in the broadcast.
class NewParticipantInBroadcastChangedEvent(
  isNewParticipantInBroadcast
)
Contains information about whether new participants will be included in the Hangout On Air broadcast by default.
isNewParticipantInBroadcast : boolean
Indicates whether new participants are in the broadcast by default.
class YouTubeLiveIdReadyEvent(
  youTubeLiveId
)
Contains information signaling the YouTube Live ID for a Hangout On Air is available.
youTubeLiveId : string
The YouTube Live ID for the Hangout On Air.

Functions in gapi.hangout.onair

Function Returns Description & Parameter
setBroadcastDisplayMode(
  broadcastDisplayMode
)
undefined Sets the broadcast screen to show or hide the filmstrip.
broadcastDisplayMode : BroadcastDisplayMode
whether the broadcast screen should show or hide the filmstrip.
getBroadcastDisplayMode() BroadcastDisplayMode Gets whether the broadcast screen shows or hides the filmstrip.
getYouTubeLiveId() string Returns the YouTube Live ID for the Hangout On Air. Returns null if the ID is not available or the Hangout is not a broadcast hangout.
isBroadcasting() boolean Returns true if the Hangout is a Hangout On Air which is currently broadcasting, false otherwise.
isNewParticipantInBroadcast() boolean Returns true if new participants to the Hangout are included in the Hangout On Air broadcast by default, false otherwise.
isOnAirHangout() boolean Returns true if the Hangout is a Hangout On Air, false otherwise. Note that this does not indicate that the Hangout is currently broadcasting — see isBroadcasting for that. This value may change from false to true when the YouTubeLiveIdReady event fires.
areAudioNotificationsDefaultMuted() boolean
setAudioNotificationsDefaultMute(
  areNotificationsMuted
)
undefined Sets whether audio notifications are muted for all new participants in the Hangout On Air broadcast. See gapi.hangout.av.setLocalAudioNotificationsMute for details on the types of sounds that are muted. This call fails for Hangouts that are not On Air, or if the local participant is not the broadcaster of the hangout.
areNotificationsMuted : boolean
Whether audio notifications are muted for all new participants.
setParticipantInBroadcast(
  participantId,
  isInBroadcast
)
undefined Sets whether the given participant is included in the Hangout On Air broadcast. This call fails for Hangouts that are not On Air, or if the local participant is not the broadcaster of the hangout.
participantId : string
The ID for a participant.
isInBroadcast : boolean
Whether that participant should be in the broadcast.
setNewParticipantInBroadcast(
  isInBroadcast
)
undefined Sets whether new participants in the Hangout are included in the Hangout On Air broadcast by default. This call fails for Hangouts that are not On Air, or if the local participant is not the broadcaster of the hangout.
isInBroadcast : boolean
Whether new participants are in the broadcast by default.
getDisplayedParticipantInBroadcast() string Gets the participant ID of the participant who is displayed in the broadcast. This call fails for Hangouts that are not On Air.
Example: 'hangout65A4C551_ephemeral.id.google.com^354e9d1ed0'
setDisplayedParticipantInBroadcast(
  participantId
)
undefined Sets the the participant to be displayed in the broadcast. This call fails for Hangouts that are not On Air, or if the local participant is not the broadcaster of the hangout.
participantId : string
The ID of a participant.
clearDisplayedParticipantInBroadcast() undefined Clears the participant chosen to be displayed in the broadcast, returning the display of broadcast participants to normal behavior. This call fails for Hangouts that are not On Air, or if the local participant is not the broadcaster of the hangout. This call also fails if this app did not make the most recent change to the participant shown in the broadcast.

Event Functions in gapi.hangout.onair

Event Function Description
gapi.hangout.onair.onAudioNotificationsDefaultMuteChanged
onAudioNotificationsDefaultMuteChanged.add(
  callback
)
Adds a callback to be called when the audio notifications are muted or unmuted for all new participants in a Hangout On Air.
callback : function(AudioNotificationsDefaultMuteChangedEvent)
The callback to add.
onAudioNotificationsDefaultMuteChanged.remove(
  callback
)
Removes a callback previously added by gapi.hangout.onair.onAudioNotificationsDefaultMuteChanged.add.
callback : function(AudioNotificationsDefaultMuteChangedEvent)
The callback to remove.
gapi.hangout.onair.onBroadcastDisplayModeChanged
onBroadcastDisplayModeChanged.add(
  callback
)
Adds a callback to be called when the broadcast display mode changes.
callback : function(BroadcastDisplayModeChangedEvent)
The callback to add.
onBroadcastDisplayModeChanged.remove(
  callback
)
Removes a callback previously added by gapi.hangout.onair.onBroadcastDisplayModeChanged.add.
callback : function(BroadcastDisplayModeChangedEvent)
The callback to remove.
gapi.hangout.onair.onBroadcastingChanged
onBroadcastingChanged.add(
  callback
)
Adds a callback to be called when the Hangout starts or stops broadcasting.
callback : function(BroadcastingChangedEvent)
The callback to add.
onBroadcastingChanged.remove(
  callback
)
Removes a callback previously added by onBroadcastingChanged.add.
callback : function(BroadcastingChangedEvent)
The callback to remove.
gapi.hangout.onair.onDisplayedParticipantInBroadcastChanged
onDisplayedParticipantInBroadcastChanged.add(
  callback
)
Adds a callback to be called when the participant displayed in the broadcast changes.
callback : function( gapi.hangout.onair.DisplayedParticipantInBroadcastChangedEvent)
The callback to add.
onDisplayedParticipantInBroadcastChanged.remove(
  callback
)
Removes a callback previously added by onDisplayedParticipantInBroadcastChanged.add.
callback : function( gapi.hangout.onair.DisplayedParticipantInBroadcastChangedEvent)
The callback to remove.
gapi.hangout.onair.onNewParticipantInBroadcastChanged
onNewParticipantInBroadcastChanged.add(
  callback
)
Adds a callback to be called when the setting changes for whether new participants are in the Hangout On Air by default.
callback : function(NewParticipantInBroadcastChangedEvent)
The callback to add.
onNewParticipantInBroadcastChanged.remove(
  callback
)
Removes a callback previously added by onNewParticipantInBroadcastChanged.add.
callback : function(NewParticipantInBroadcastChangedEvent)
The callback to remove.
gapi.hangout.onair.onYouTubeLiveIdReady
onYouTubeLiveIdReady.add(
  callback
)
Adds a callback to be called when the YouTube Live ID is set for a Hangout On Air.
callback : function(YouTubeLiveIdReadyEvent)
The callback to add.
onYouTubeLiveIdReady.remove(
  callback
)
Removes a callback previously added by onYouTubeLiveIdReady.add.
callback : function(YouTubeLiveIdReadyEvent)
The callback to remove.

Enums in gapi.hangout.onair

Enum Description
BroadcastDisplayMode Determines whether the broadcast video shows or hides the filmstrip:

FOCUSED_FEED_ONLY - Always display main feed only.
HANGOUT_VIEW - Always display main feed and filmstrip.
AUTO - Automatically hide filmstrip when there is one user.
FOCUSED_FEED_ONLY
HANGOUT_VIEW
AUTO

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.