com.google.gwt.widgetideas.client
Class YouTubeViewer

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.widgetideas.client.EmbeddedObject
              extended by com.google.gwt.widgetideas.client.YouTubeViewer
All Implemented Interfaces:
com.google.gwt.user.client.EventListener

public class YouTubeViewer
extends EmbeddedObject

A Widget used to embed a single YouTube video.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.widgetideas.client.EmbeddedObject
EmbeddedObject.EmbeddedObjectInfo
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
static java.lang.String BASE_URL
          The base URL of all YouTube videos.
 
Fields inherited from class com.google.gwt.widgetideas.client.EmbeddedObject
TYPE_SHOCKWAVE
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
YouTubeViewer(java.lang.String movieID)
          Constructor.
YouTubeViewer(java.lang.String movieID, boolean autoPlayEnabled)
          Constructor.
 
Method Summary
 java.lang.String getMovieID()
          Get the movie ID.
 java.lang.String getURL()
          Get the full URL of the video.
 boolean isAutoPlayEnabled()
          Check whether or not autoPlay is enabled.
 boolean isRelatedVideosEnabled()
          Check whether or not the player will show related videos.
 void setAutoPlayEnabled(boolean autoPlayEnabled)
          Enable or disable autoPlay.
 void setMovieID(java.lang.String movieID)
          Set the movie ID.
 void setRelatedVideosEnabled(boolean relatedVideosEnabled)
          Enable or disable related videos in the player.
 
Methods inherited from class com.google.gwt.widgetideas.client.EmbeddedObject
getInfo, render, setInfo, setInfo
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
doAttachChildren, doDetachChildren, getParent, isAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setElement
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BASE_URL

public static final java.lang.String BASE_URL
The base URL of all YouTube videos.

See Also:
Constant Field Values
Constructor Detail

YouTubeViewer

public YouTubeViewer(java.lang.String movieID)
Constructor.

Parameters:
movieID - the ID of the YouTube movie to play

YouTubeViewer

public YouTubeViewer(java.lang.String movieID,
                     boolean autoPlayEnabled)
Constructor.

Parameters:
movieID - the ID of the YouTube movie to play
autoPlayEnabled - true to automatically play movies
Method Detail

getMovieID

public java.lang.String getMovieID()
Get the movie ID.

Returns:
the movie ID

getURL

public java.lang.String getURL()
Get the full URL of the video.

Returns:
the full URL of the video.

isAutoPlayEnabled

public boolean isAutoPlayEnabled()
Check whether or not autoPlay is enabled.

Returns:
true if autoPlay is enabled

isRelatedVideosEnabled

public boolean isRelatedVideosEnabled()
Check whether or not the player will show related videos.

Returns:
true if related videos will be shown

setAutoPlayEnabled

public void setAutoPlayEnabled(boolean autoPlayEnabled)
Enable or disable autoPlay. When enabled, videos will immediately start playing when you set the movieID. By default, autoPlay is disabled.

Parameters:
autoPlayEnabled - true to enable autoPlay

setMovieID

public void setMovieID(java.lang.String movieID)
Set the movie ID.

Parameters:
movieID - the movie ID

setRelatedVideosEnabled

public void setRelatedVideosEnabled(boolean relatedVideosEnabled)
Enable or disable related videos in the player. When enabled, the player will display related videos after the current video completed. By default, related videos are disabled

Parameters:
relatedVideosEnabled - true to enable related videos