Package muntjac :: Package ui :: Module audio :: Class Audio
[hide private]
[frames] | no frames]

Class Audio

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 --+
                                                       |
                                                      Audio

The Audio component translates into an HTML5 <audio> 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

Inherited from abstract_media.AbstractMedia: addSource, getAltText, getSources, isAutoplay, isHtmlContentAllowed, isMuted, isShowControls, paintContent, 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 of the audio component
  • source - The audio file to play.
Overrides: object.__init__