|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
com.bramosystems.oss.player.core.client.AbstractMediaPlayer
com.bramosystems.oss.player.youtube.client.YouTubePlayer
com.bramosystems.oss.player.youtube.client.ChromelessPlayer
public class ChromelessPlayer
Widget to embed the chromeless YouTube video player. The player is particularly useful when embedding YouTube with custom controls.
SimplePanel panel = new SimplePanel(); // create panel to hold the player
Widget player = null;
try {
// create the player
player = new ChromelessPlayer("http://www.youtube.com/v/VIDEO_ID&fs=1", "100%", "350px");
} catch(PluginVersionException e) {
// catch plugin version exception and alert user to download plugin first.
// An option is to use the utility method in PlayerUtil class.
player = PlayerUtil.getMissingPluginNotice(e.getPlugin());
} catch(PluginNotFoundException e) {
// catch PluginNotFoundException and tell user to download plugin, possibly providing
// a link to the plugin download page.
player = new HTML(".. another kind of message telling the user to download plugin..");
}
panel.setWidget(player); // add player to panel.
| Nested Class Summary |
|---|
| 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 |
|---|
| Fields inherited from class com.bramosystems.oss.player.youtube.client.YouTubePlayer |
|---|
_height, _vURL, _width, impl, playerId |
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
ChromelessPlayer(java.lang.String videoURL,
PlayerParameters playerParameters,
java.lang.String width,
java.lang.String height)
Constructs ChromelessPlayer with the specified height and
width to playback video located at videoURL using the specified
playerParameters |
|
ChromelessPlayer(java.lang.String videoURL,
java.lang.String width,
java.lang.String height)
Constructs ChromelessPlayer with the specified height and
width to playback video located at videoURL |
|
| Method Summary | |
|---|---|
protected java.lang.String |
getNormalizedVideoAppURL(java.lang.String videoURL,
PlayerParameters playerParameters)
Returns the normalized URL of the video. |
boolean |
isControllerVisible()
Checks whether the player controls are visible. |
protected void |
playerInit()
Called when player initialization is completed. |
| Methods inherited from class com.bramosystems.oss.player.youtube.client.YouTubePlayer |
|---|
addPlaybackQualityChangeHandler, getAvailableQualityLevels, getLoopCount, getMediaDuration, getPlaybackQuality, getPlayPosition, getRepeatMode, getVolume, loadMedia, onLoad, onUnload, paramsToString, parseURLParams, pauseMedia, playMedia, setConfigParameter, setLoopCount, setPlaybackQuality, setPlayPosition, setRepeatMode, setVolume, showLogger, stopMedia |
| Methods inherited from class com.google.gwt.user.client.ui.Composite |
|---|
getWidget, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, setWidget |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
addAttachHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, removeFromParent, setLayoutData, sinkEvents |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
|---|
fireEvent |
| Constructor Detail |
|---|
public ChromelessPlayer(java.lang.String videoURL,
java.lang.String width,
java.lang.String height)
throws PluginNotFoundException,
PluginVersionException
ChromelessPlayer with the specified height and
width to playback video located at videoURL
height and width are specified as CSS units.
videoURL - the URL of the videowidth - the width of the playerheight - the height of the player
PluginNotFoundException - if the required Flash player plugin is not found
PluginVersionException - if Flash player version 8 and above is not found
java.lang.NullPointerException - if either videoURL, height or width is null
public ChromelessPlayer(java.lang.String videoURL,
PlayerParameters playerParameters,
java.lang.String width,
java.lang.String height)
throws PluginNotFoundException,
PluginVersionException
ChromelessPlayer with the specified height and
width to playback video located at videoURL using the specified
playerParameters
height and width are specified as CSS units.
videoURL - the URL of the videoplayerParameters - the parameters of the playerwidth - the width of the playerheight - the height of the player
PluginNotFoundException - if the required Flash player plugin is not found
PluginVersionException - if Flash player version 8 and above is not found
java.lang.NullPointerException - if either videoURL, height or width is null| Method Detail |
|---|
protected java.lang.String getNormalizedVideoAppURL(java.lang.String videoURL,
PlayerParameters playerParameters)
YouTubePlayerThis method is called by the player Constructors. It adjusts the parameters that may
be present in the videoURL and playerParameters (possibly overriding some)
to match the requirements of this players' internals.
getNormalizedVideoAppURL in class YouTubePlayervideoURL - the URL of the YouTube™ videoplayerParameters - the parameters of the video
protected void playerInit()
YouTubePlayer
playerInit in class YouTubePlayerpublic boolean isControllerVisible()
isControllerVisible in class YouTubePlayertrue if player controls are visible, false otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||