Package muntjac :: Package ui :: Module video :: Class Video
[hide private]
[frames] | no frames]

Class Video

source code

                          object --+                    
                                   |                    
                 util.IEventListener --+                
                                       |                
           terminal.paintable.IPaintable --+            
                                           |            
                              object --+   |            
                                       |   |            
  terminal.variable_owner.IVariableOwner --+            
                                           |            
                              object --+   |            
                                       |   |            
             terminal.sizeable.ISizeable --+            
                                           |            
                        component.IComponent --+        
                                               |        
                                  object --+   |        
                                           |   |        
event.method_event_source.IMethodEventSource --+        
                                               |        
            abstract_component.AbstractComponent --+    
                                                   |    
                        abstract_media.AbstractMedia --+
                                                       |
                                                      Video

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 setAltText.

A flash-player fallback can be implemented by setting HTML content allowed (setHtmlContentAllowed and calling setAltText with the flash player markup. An example of flash fallback can be found at the <a href= "https://developer.mozilla.org/En/Using_audio_and_video_in_Firefox#Using_Flash" >Mozilla Developer Network</a>.

Multiple sources can be specified. Which of the sources is used is selected by the browser depending on which file formats it supports. See <a href="http://en.wikipedia.org/wiki/HTML5_video#Table">wikipedia</a> for a table of formats supported by different browsers.


Authors:
Vaadin Ltd, Richard Lincoln
Instance Methods [hide private]
 
__init__(self, caption='', source=None)
Constructs a new IComponent.
source code
 
setPoster(self, poster)
Sets the poster image, which is shown in place of the video before the user presses play.
source code
 
getPoster(self)
@return The poster image.
source code
 
paintContent(self, target)
Paints any needed component-specific things to the given UIDL stream.
source code

Inherited from abstract_media.AbstractMedia: addSource, getAltText, getSources, isAutoplay, isHtmlContentAllowed, isMuted, isShowControls, pause, play, setAltText, setAutoplay, setHtmlContentAllowed, setMuted, setShowControls, setSource, setSources

Inherited from abstract_component.AbstractComponent: __getstate__, __setstate__, addCallback, addListener, addStyleName, attach, changeVariables, childRequestedRepaint, detach, fireComponentErrorEvent, fireComponentEvent, fireEvent, fireRequestRepaintEvent, focus, getApplication, getCSSHeight, getCSSWidth, 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, parseStringSize, registerCallback, registerListener, removeCallback, removeListener, removeStyleName, requestRepaint, requestRepaintRequests, setCaption, setComponentError, setData, setDebugId, setDescription, setEnabled, setErrorHandler, setHeight, setHeightUnits, setIcon, setImmediate, setLocale, setParent, setReadOnly, setSizeFull, setSizeUndefined, setStyle, setStyleName, setVisible, setWidth, setWidthUnits, withdrawCallback, withdrawListener

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  CLIENT_WIDGET = None
hash(x)

Inherited from abstract_component.AbstractComponent: SIZE_PATTERN

Inherited from terminal.sizeable.ISizeable: SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS, UNIT_SYMBOLS

Instance Variables [hide private]
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, caption='', source=None)
(Constructor)

source code 

Constructs a new IComponent.

Parameters:
  • caption - The caption for this video.
  • source - The resource containing the video to play.
Overrides: object.__init__

paintContent(self, target)

source code 

Paints any needed component-specific things to the given UIDL stream. The more general paint method handles all general attributes common to all components, and it calls this method to paint any component-specific attributes to the UIDL stream.

Parameters:
  • target - the target UIDL stream where the component should paint itself to
Raises:
Overrides: abstract_component.AbstractComponent.paintContent
(inherited documentation)