com.vaadin.ui
Class Video
java.lang.Object
com.vaadin.server.AbstractClientConnector
com.vaadin.ui.AbstractComponent
com.vaadin.ui.AbstractMedia
com.vaadin.ui.Video
- All Implemented Interfaces:
- MethodEventSource, ClientConnector, Sizeable, com.vaadin.shared.Connector, Component, java.io.Serializable
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
Method Summary |
Resource |
getPoster()
|
protected com.vaadin.shared.ui.video.VideoState |
getState()
Returns the shared state bean with information to be sent from the server
to the client. |
void |
setPoster(Resource poster)
Sets the poster image, which is shown in place of the video before the
user presses play. |
Methods inherited from class com.vaadin.ui.AbstractMedia |
addSource, getAltText, getSources, getState, handleConnectorRequest, isAutoplay, isHtmlContentAllowed, isMuted, isShowControls, pause, play, setAltText, setAutoplay, setHtmlContentAllowed, setMuted, setShowControls, setSource, setSources |
Methods inherited from class com.vaadin.ui.AbstractComponent |
addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isConnectorEnabled, isEnabled, isImmediate, isOrHasAncestor, isReadOnly, isVisible, removeListener, removeShortcutListener, removeStyleName, setCaption, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setHeight, setHeightUndefined, setIcon, setId, setImmediate, setLocale, setParent, setPrimaryStyleName, setReadOnly, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth, setWidthUndefined |
Methods inherited from class com.vaadin.server.AbstractClientConnector |
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.vaadin.server.ClientConnector |
addAttachListener, addDetachListener, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, isAttached, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler |
Methods inherited from interface com.vaadin.shared.Connector |
getConnectorId |
Video
public Video()
Video
public Video(java.lang.String caption)
- Parameters:
caption
- The caption for this video.
Video
public Video(java.lang.String caption,
Resource source)
- Parameters:
caption
- The caption for this video.source
- The Resource containing the video to play.
getState
protected com.vaadin.shared.ui.video.VideoState getState()
- Description copied from class:
AbstractComponent
- Returns the shared state bean with information to be sent from the server
to the client.
Subclasses should override this method and set any relevant fields of the
state returned by super.getState().
- Overrides:
getState
in class AbstractMedia
- Returns:
- updated component shared state
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.
Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.