Class Video

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.
  • Constructor Details

  • Method Details

    • createIfSupported

      public static Video createIfSupported()
      Return a new Video 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 String getPoster()
      Returns a poster URL.
      Returns:
      a URL containing a poster image
      See Also:
    • 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, use Element.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, use Element.getOffsetWidth()
      Returns:
      the width, in pixels
    • setPoster

      public void setPoster(String url)
      Sets the poster URL.
      Parameters:
      url - the poster image URL
      See Also: