Provides ability to set UI layout elements such as the video feed,
chat pane, and notices.
Classes
Functions
Events
Classes in gapi.hangout.layout
| Class |
Description |
class ChatPaneVisibleEvent( isChatPaneVisible )
|
Contains information about whether the chat pane is visible.
-
isChatPaneVisible : boolean
-
Indicates whether the chat pane is visible.
|
class DefaultVideoFeed( onDisplayedParticipantChanged )
|
The normal video feed with standard Hangouts participant selection
showing the active speaker.
Jump to instance methods
-
onDisplayedParticipantChanged : undefined
-
An event that fires when the displayed participant changes.
|
class DisplayedParticipantChangedEvent( displayedParticipant )
|
Contains information about a change to which participant is currently
displayed.
-
displayedParticipant : string
-
The participant ID of the currently displayed participant.
|
class HasNoticeEvent( hasNotice )
|
Contains information about whether a notice is currently displayed.
-
hasNotice : boolean
-
Indicates whether a notice is currently being displayed.
|
class VideoCanvas()
|
A canvas on which a
VideoFeed renders.
Each Hangout has a single VideoCanvas instance.
The video canvas displays in front of the app
and cannot have other HTML elements in front of it.
Get the VideoCanvas object with
getVideoCanvas.
Jump to instance methods
|
class VideoFeed()
|
A video feed which can be displayed on the
VideoCanvas.
A video feed can either show a participant, by using
createParticipantVideoFeed, or the active speaker, by using
getDefaultVideoFeed.
Jump to instance methods
|
DefaultVideoFeed Instance Methods in gapi.hangout.layout
| Instance Method |
Returns |
Description & Parameter |
setDisplayedParticipant( participantId )
|
undefined
|
Sets the participant to be displayed in the default video feed.
If any app is displayed in the main window, setting the displayed participant
in the default video feed will hide that app in favor of the participant.
-
participantId : string
- The participant to display.
|
clearDisplayedParticipant()
|
undefined
|
Clears the participant chosen to be displayed in the default video feed
only if this app was the most recent to set the currently displayed
participant.
|
VideoCanvas Instance Methods in gapi.hangout.layout
| Instance Method |
Returns |
Description & Parameter |
getAspectRatio()
|
number
|
Returns the aspect ratio of the canvas.
|
getHeight()
|
number
|
Gets the height of the video canvas, in pixels.
|
getPosition()
|
{left: number, top: number}
|
Returns the position of the video canvas.
|
getSize()
|
{width: number, height: number}
|
Returns the size of the video canvas.
|
getWidth()
|
number
|
Gets the width of the video canvas, in pixels.
|
getVideoFeed()
|
VideoFeed
|
Returns the video feed being shown on this canvas.
|
isVisible()
|
boolean
|
Returns true if the video canvas is visible, false otherwise.
|
setHeight( height )
|
{width: number, height: number}
|
Sets the height of the canvas, in pixels. The width will automatically
be set based on the aspect ratio of the canvas. Returns the new size of the
video canvas.
-
height : number
- The new height of the video canvas.
|
setPosition( value, opt_top )
|
undefined
|
Sets the position of the video canvas, in pixels, from the top left
corner of the app.
-
value : number|{left: number, top: number}
- Either a single number
representing the left offset, or an object with the top and left offsets.
-
opt_top : number
- The top offset. (This parameter is ignored if
value is an object.)
|
setVideoFeed( feed )
|
undefined
|
Sets which video feed is being shown on this canvas.
-
feed : VideoFeed
- The feed to be shown.
|
setVisible( visible )
|
undefined
|
Sets the visibility of the video canvas.
-
visible : boolean
- Whether the video canvas is visible.
|
setWidth( width )
|
{width: number, height: number}
|
Sets the width of the canvas, the height will be automatically set based on
the aspect ratio of the canvas. Returns the new size of the video canvas.
-
width : number
- The new width of the video canvas.
|
VideoFeed Instance Methods in gapi.hangout.layout
| Instance Method |
Returns |
Description & Parameter |
getDisplayedParticipant()
|
string
|
Gets the participant ID of the participant who is displayed in this video
feed.
Example: 'hangout65A4C551_ephemeral.id.google.com^354e9d1ed0'
|
Functions in gapi.hangout.layout
| Function |
Returns |
Description & Parameter |
createParticipantVideoFeed( participantId )
|
VideoFeed
|
Creates a video feed that displays only a given participant.
-
participantId : string
- The ID of the participant to display.
|
dismissNotice()
|
undefined
|
Dismisses the currently displayed notice.
|
displayNotice( message, opt_permanent )
|
undefined
|
Displays a notice at the top of the Hangout window.
-
message : string
- The message to display in the notice.
-
opt_permanent : boolean
- If true, the notice will remain until
dismissNotice is called, the
local participant dismisses the notice, or the Hangout shows a notice.
Otherwise, the notice will disappear after a few seconds.
|
getDefaultVideoFeed()
|
DefaultVideoFeed
|
Returns the DefaultVideoFeed.
|
getVideoCanvas()
|
VideoCanvas
|
Returns the VideoCanvas,
initially set to the default video feed.
|
hasNotice()
|
boolean
|
Returns true if a notice is currently being displayed, false otherwise.
|
isChatPaneVisible()
|
boolean
|
Returns true if a chat pane is visible, false otherwise.
|
setChatPaneVisible( visible )
|
undefined
|
Shows or hides the chat pane. See also: gapi.hangout.layout.onChatPaneVisible
-
visible : boolean
- True if the chat pane should be shown.
|
Event Functions in gapi.hangout.layout
| Event Function |
Description |
| gapi.hangout.layout.onChatPaneVisible |
onChatPaneVisible.add( callback )
|
Adds a callback to be called whenever the chat pane is shown or hidden.
-
callback : function(ChatPaneVisibleEvent)
-
The
callback to add.
|
onChatPaneVisible.remove( callback )
|
Removes a callback previously added by
onChatPaneVisible.add.
-
callback : function(ChatPaneVisibleEvent)
-
The
callback to remove.
|
| gapi.hangout.layout.onHasNotice |
onHasNotice.add( callback )
|
Adds a callback to be called whenever a notice is either displayed or
dismissed. The argument to the callback is an event that is true
if a notice is currently displayed.
-
callback : function(HasNoticeEvent)
-
The callback
to add.
|
onHasNotice.remove( callback )
|
Removes a callback previously added by
onHasNotice.add.
-
callback : function(HasNoticeEvent)
-
The callback
to remove.
|