com.vaadin.ui
Class Video
java.lang.Object
com.vaadin.ui.AbstractComponent
com.vaadin.ui.AbstractMedia
com.vaadin.ui.Video
- All Implemented Interfaces:
- MethodEventSource, Paintable, Sizeable, VariableOwner, Component, Serializable, EventListener
public class Video
- extends AbstractMedia
The Video component translates into an HTML5 <video> element and as
such is only supported in browsers that support HTML5 media markup. Browsers
that do not support HTML5 display the text or HTML set by calling
AbstractMedia.setAltText(String)
.
A flash-player fallback can be implemented by setting HTML content allowed (
AbstractMedia.setHtmlContentAllowed(boolean)
and calling
AbstractMedia.setAltText(String)
with the flash player markup. An example of flash
fallback can be found at the Mozilla Developer Network.
Multiple sources can be specified. Which of the sources is used is selected
by the browser depending on which file formats it supports. See wikipedia for a
table of formats supported by different browsers.
- Since:
- 6.7.0
- Author:
- Vaadin Ltd
- See Also:
- Serialized Form
Fields inherited from interface com.vaadin.terminal.Sizeable |
SIZE_UNDEFINED, UNIT_SYMBOLS, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS |
Methods inherited from class com.vaadin.ui.AbstractMedia |
addSource, getAltText, getSources, isAutoplay, isHtmlContentAllowed, isMuted, isShowControls, pause, play, setAltText, setAutoplay, setHtmlContentAllowed, setMuted, setShowControls, setSource, setSources |
Methods inherited from class com.vaadin.ui.AbstractComponent |
addListener, addListener, addListener, addListener, addListener, addStyleName, attach, changeVariables, childRequestedRepaint, detach, fireComponentErrorEvent, fireComponentEvent, fireEvent, focus, getApplication, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorHandler, getErrorMessage, getHeight, getHeightUnits, getIcon, getListeners, getLocale, getParent, getStyle, getStyleName, getWidth, getWidthUnits, getWindow, handleError, hasListeners, isEnabled, isImmediate, isReadOnly, isVisible, paint, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeStyleName, requestRepaint, requestRepaintRequests, setCaption, setComponentError, setData, setDebugId, setDescription, setEnabled, setErrorHandler, setHeight, setHeight, setHeight, setHeightUnits, setIcon, setImmediate, setLocale, setParent, setReadOnly, setSizeFull, setSizeUndefined, setStyle, setStyleName, setVisible, setWidth, setWidth, setWidth, setWidthUnits |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Video
public Video()
Video
public Video(String caption)
- Parameters:
caption
- The caption for this video.
Video
public Video(String caption,
Resource source)
- Parameters:
caption
- The caption for this video.source
- The Resource containing the video to play.
setPoster
public void setPoster(Resource poster)
- Sets the poster image, which is shown in place of the video before the
user presses play.
- Parameters:
poster
-
getPoster
public Resource getPoster()
- Returns:
- The poster image.
paintContent
public void paintContent(PaintTarget target)
throws PaintException
- Description copied from class:
AbstractComponent
- Paints any needed component-specific things to the given UIDL stream. The
more general
AbstractComponent.paint(PaintTarget)
method handles all general
attributes common to all components, and it calls this method to paint
any component-specific attributes to the UIDL stream.
- Overrides:
paintContent
in class AbstractMedia
- Parameters:
target
- the target UIDL stream where the component should paint itself
to
- Throws:
PaintException
- if the paint operation failed.
Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.