Package com.google.gwt.media.client
Class Video
- java.lang.Object
-
- All Implemented Interfaces:
HasAllDragAndDropHandlers
,HasAllFocusHandlers
,HasAllGestureHandlers
,HasAllKeyHandlers
,HasAllMediaHandlers
,HasAllMouseHandlers
,HasAllTouchHandlers
,HasBlurHandlers
,HasCanPlayThroughHandlers
,HasClickHandlers
,HasDoubleClickHandlers
,HasDragEndHandlers
,HasDragEnterHandlers
,HasDragHandlers
,HasDragLeaveHandlers
,HasDragOverHandlers
,HasDragStartHandlers
,HasDropHandlers
,HasEndedHandlers
,HasFocusHandlers
,HasGestureChangeHandlers
,HasGestureEndHandlers
,HasGestureStartHandlers
,HasKeyDownHandlers
,HasKeyPressHandlers
,HasKeyUpHandlers
,HasLoadedMetadataHandlers
,HasMouseDownHandlers
,HasMouseMoveHandlers
,HasMouseOutHandlers
,HasMouseOverHandlers
,HasMouseUpHandlers
,HasMouseWheelHandlers
,HasProgressHandlers
,HasTouchCancelHandlers
,HasTouchEndHandlers
,HasTouchMoveHandlers
,HasTouchStartHandlers
,HasAttachHandlers
,HasHandlers
,EventListener
,Focusable
,HasEnabled
,HasFocus
,HasVisibility
,IsWidget
,SourcesClickEvents
,SourcesFocusEvents
,SourcesKeyboardEvents
,SourcesMouseEvents
public class Video extends MediaBase
A widget representing a <video> element.
Experimental API: This API is still under development and is subject to change.
This widget may not be supported on all browsers.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
-
-
Field Summary
-
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Video(VideoElement element)
Protected constructor.Video(java.lang.String src)
Deprecated.usecreateIfSupported()
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Video
createIfSupported()
Return a newVideo
if supported, and null otherwise.java.lang.String
getPoster()
Returns a poster URL.VideoElement
getVideoElement()
Returns the attached VideoElement.int
getVideoHeight()
Gets the intrinsic height of video within the element.int
getVideoWidth()
Gets the instrinsic width of the video within the element.static boolean
isSupported()
Runtime check for whether the video element is supported in this browser.void
setPoster(java.lang.String url)
Sets the poster URL.-
Methods inherited from class com.google.gwt.media.client.MediaBase
addCanPlayThroughHandler, addEndedHandler, addLoadedMetadataHandler, addProgressHandler, addSource, addSource, canPlayType, getBuffered, getCurrentSrc, getCurrentTime, getDefaultPlaybackRate, getDuration, getError, getInitialTime, getMediaElement, getNetworkState, getPlaybackRate, getPlayed, getPreload, getReadyState, getSeekable, getSrc, getStartOffsetTime, getVolume, hasControls, hasEnded, isAutoplay, isLoop, isMuted, isPaused, isSeeking, load, pause, play, removeSource, setAutoplay, setControls, setCurrentTime, setDefaultPlaybackRate, setLoop, setMuted, setPlaybackRate, setPreload, setSrc, setVolume
-
Methods inherited from class com.google.gwt.user.client.ui.FocusWidget
addBlurHandler, addClickHandler, addClickListener, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addFocusHandler, addFocusListener, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyboardListener, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, getFocusImpl, getTabIndex, isEnabled, onAttach, removeClickListener, removeFocusListener, removeKeyboardListener, removeMouseListener, removeMouseWheelListener, setAccessKey, setEnabled, setFocus, setTabIndex
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
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, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
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
-
Video
protected Video(VideoElement element)
Protected constructor. UsecreateIfSupported()
to create a Video.
-
Video
@Deprecated public Video(java.lang.String src)
Deprecated.usecreateIfSupported()
.Creates a Video widget with a given source URL.- Parameters:
src
- a String URL.
-
-
Method Detail
-
createIfSupported
public static Video createIfSupported()
Return a newVideo
if supported, and null otherwise.- Returns:
- a new
Video
if supported, and null otherwise
-
isSupported
public static boolean isSupported()
Runtime check for whether the video element is supported in this browser.- Returns:
- whether the video element is supported
-
getPoster
public java.lang.String getPoster()
Returns a poster URL.- Returns:
- a URL containing a poster image
- See Also:
setPoster(String)
-
getVideoElement
public VideoElement getVideoElement()
Returns the attached VideoElement.- Returns:
- the VideoElement
-
getVideoHeight
public int getVideoHeight()
Gets the intrinsic height of video within the element. To get the element height, useElement.getOffsetHeight()
- Returns:
- the height, in pixels
-
getVideoWidth
public int getVideoWidth()
Gets the instrinsic width of the video within the element. To get the element width, useElement.getOffsetWidth()
- Returns:
- the width, in pixels
-
setPoster
public void setPoster(java.lang.String url)
Sets the poster URL.- Parameters:
url
- the poster image URL- See Also:
getPoster()
-
-