public class VimeoFlashPlayer
extends com.bramosystems.oss.player.core.client.AbstractMediaPlayer
SimplePanel panel = new SimplePanel(); // create panel to hold the player
Widget player = null;
try {
// create the player
player = new VimeoFlashPlayer("video-id", false, "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(), "Missing Plugin",
".. some nice message telling the user to click and download plugin first ..",
false);
} 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.
| Constructor and Description |
|---|
VimeoFlashPlayer(String videoId,
boolean autoplay,
String width,
String height)
Creates a VimeoFlashPlayer widget to playback the specified
videoId. |
| Modifier and Type | Method and Description |
|---|---|
long |
getMediaDuration() |
double |
getPlayPosition() |
com.bramosystems.oss.player.core.client.RepeatMode |
getRepeatMode() |
int |
getVideoHeight() |
int |
getVideoWidth() |
double |
getVolume() |
boolean |
isControllerVisible() |
void |
loadMedia(String mediaURL)
This implementation does nothing.
|
protected void |
onLoad() |
void |
pauseMedia() |
void |
playMedia() |
<C extends com.bramosystems.oss.player.core.client.ConfigParameter> |
setConfigParameter(C param,
Object value) |
void |
setPlayPosition(double position) |
void |
setRepeatMode(com.bramosystems.oss.player.core.client.RepeatMode mode) |
void |
setVolume(double volume) |
void |
stopMedia() |
addDebugHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addLoadingProgressHandler, addMediaInfoHandler, addMouseDownHandler, addMouseMoveHandler, addMouseUpHandler, addPlayerStateHandler, addPlayStateHandler, addToPlayerReadyCommandQueue, fireDebug, fireError, fireLoadingProgress, fireMediaInfoAvailable, firePlayerStateEvent, firePlayStateEvent, getLoopCount, getRate, getWidgetFactory, isPlayerOnPage, isResizeToVideoSize, removeFromPlayerReadyCommandQueue, setControllerVisible, setLoopCount, setRate, setResizeToVideoSizeclaimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidgetaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onUnload, removeFromParent, setLayoutData, sinkEventsaddStyleDependentName, 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, sinkBitlessEvent, toString, unsinkEventspublic VimeoFlashPlayer(String videoId, boolean autoplay, String width, String height) throws com.bramosystems.oss.player.core.client.PluginNotFoundException, com.bramosystems.oss.player.core.client.PluginVersionException
videoId.videoId - the identifier of the videoautoplay - true to start playback automatically, false otherwisewidth - the width of the player widget, in CSS unitsheight - the height of the player widget, in CSS unitscom.bramosystems.oss.player.core.client.PluginNotFoundException - if the required Adobe Flash player plugin in not installed on the browsercom.bramosystems.oss.player.core.client.PluginVersionException - if the required Adobe Flash player plugin version is not installedprotected void onLoad()
onLoad in class com.google.gwt.user.client.ui.Widgetpublic void loadMedia(String mediaURL) throws com.bramosystems.oss.player.core.client.LoadException
loadMedia in class com.bramosystems.oss.player.core.client.AbstractMediaPlayercom.bramosystems.oss.player.core.client.LoadExceptionpublic void playMedia()
throws com.bramosystems.oss.player.core.client.PlayException
playMedia in class com.bramosystems.oss.player.core.client.AbstractMediaPlayercom.bramosystems.oss.player.core.client.PlayExceptionpublic void stopMedia()
stopMedia in class com.bramosystems.oss.player.core.client.AbstractMediaPlayerpublic void pauseMedia()
pauseMedia in class com.bramosystems.oss.player.core.client.AbstractMediaPlayerpublic long getMediaDuration()
getMediaDuration in class com.bramosystems.oss.player.core.client.AbstractMediaPlayerpublic double getPlayPosition()
getPlayPosition in class com.bramosystems.oss.player.core.client.AbstractMediaPlayerpublic void setPlayPosition(double position)
setPlayPosition in class com.bramosystems.oss.player.core.client.AbstractMediaPlayerpublic double getVolume()
getVolume in class com.bramosystems.oss.player.core.client.AbstractMediaPlayerpublic void setVolume(double volume)
setVolume in class com.bramosystems.oss.player.core.client.AbstractMediaPlayerpublic void setRepeatMode(com.bramosystems.oss.player.core.client.RepeatMode mode)
setRepeatMode in class com.bramosystems.oss.player.core.client.AbstractMediaPlayerpublic com.bramosystems.oss.player.core.client.RepeatMode getRepeatMode()
getRepeatMode in class com.bramosystems.oss.player.core.client.AbstractMediaPlayerpublic int getVideoHeight()
getVideoHeight in class com.bramosystems.oss.player.core.client.AbstractMediaPlayerpublic int getVideoWidth()
getVideoWidth in class com.bramosystems.oss.player.core.client.AbstractMediaPlayerpublic boolean isControllerVisible()
isControllerVisible in class com.bramosystems.oss.player.core.client.AbstractMediaPlayerpublic <C extends com.bramosystems.oss.player.core.client.ConfigParameter> void setConfigParameter(C param,
Object value)
setConfigParameter in class com.bramosystems.oss.player.core.client.AbstractMediaPlayerCopyright © 2009-2013. All Rights Reserved.