org.apache.myfaces.html5.component.media
Class AbstractMedia

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIOutput
              extended by javax.faces.component.html.HtmlOutputText
                  extended by org.apache.myfaces.html5.component.media.AbstractMedia
All Implemented Interfaces:
EventListener, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.ValueHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, Draggable, AccesskeyProperty, GlobalEventProperties, Html5GlobalProperties, KeyEventProperties, MediaEventProperties, MouseEventProperties, TabindexProperty, MediaSourceHolder
Direct Known Subclasses:
Media

@JSFComponent(clazz="org.apache.myfaces.html5.component.media.Media",
              implementz="javax.faces.component.behavior.ClientBehaviorHolder",
              defaultEventName="play",
              configExcluded=true)
public abstract class AbstractMedia
extends javax.faces.component.html.HtmlOutputText
implements MediaSourceHolder, Html5GlobalProperties, AccesskeyProperty, TabindexProperty, MouseEventProperties, KeyEventProperties, MediaEventProperties, GlobalEventProperties

Base class for Video and Audio components.

Author:
Ali Ok

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.faces.component.html.HtmlOutputText
javax.faces.component.html.HtmlOutputText.PropertyKeys
 
Field Summary
protected  Set<MediaInfo> mediaInfoSet
           
 
Fields inherited from class javax.faces.component.html.HtmlOutputText
COMPONENT_FAMILY, COMPONENT_TYPE
 
Fields inherited from class javax.faces.component.UIComponent
BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, VIEW_LOCATION_KEY
 
Constructor Summary
AbstractMedia()
           
 
Method Summary
 void addMediaInfo(MediaInfo... mediaInfo)
          Add media info to media info array/collection.
 Set<MediaInfo> getMediaInfos()
          Returns the MediaInfo instances held by this component.
abstract  String getPreload()
          Returns the preloading behavior of the component.
abstract  boolean isAutoplay()
          If this property is set, media will start playing as soon as the page loads.
abstract  boolean isEscape()
           
abstract  boolean isLoop()
          If this property is set, media will seek back to start when it reaches the end.
abstract  boolean isShowControls()
          This property is to show/hide browser's media controls.
 
Methods inherited from class javax.faces.component.html.HtmlOutputText
getDir, getFamily, getLang, getStyle, getStyleClass, getTitle, setDir, setEscape, setLang, setStyle, setStyleClass, setTitle
 
Methods inherited from class javax.faces.component.UIOutput
clearInitialState, getConverter, getLocalValue, getValue, markInitialState, restoreState, saveState, setConverter, setValue
 
Methods inherited from class javax.faces.component.UIComponentBase
addClientBehavior, addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, initialStateMarked, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, visitTree
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.myfaces.html5.component.properties.Html5GlobalProperties
getAnimationEnd, getDir, getLang, getOndrag, getOndragend, getOndragenter, getOndragleave, getOndragover, getOndragstart, getOndrop, getOnmousewheel, getStyle, getStyleClass, getTitle, isDraggable, isHidden
 
Methods inherited from interface org.apache.myfaces.html5.component.api.Draggable
setDraggable
 
Methods inherited from interface org.apache.myfaces.html5.component.properties.AccesskeyProperty
getAccesskey
 
Methods inherited from interface org.apache.myfaces.html5.component.properties.TabindexProperty
getTabindex
 
Methods inherited from interface org.apache.myfaces.html5.component.properties.MouseEventProperties
getOnclick, getOndblclick, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnmousewheel
 
Methods inherited from interface org.apache.myfaces.html5.component.properties.KeyEventProperties
getOnkeydown, getOnkeypress, getOnkeyup
 
Methods inherited from interface org.apache.myfaces.html5.component.properties.MediaEventProperties
getOnended, getOnerror, getOnloadeddata, getOnloadedmetadata, getOnloadstart, getOnpause, getOnplay, getOnplaying, getOnprogress, getOnseeked, getOnseeking, getOnvolumechange, getOnwaiting
 
Methods inherited from interface org.apache.myfaces.html5.component.properties.GlobalEventProperties
getOnblur, getOnclick, getOndblclick, getOnfocus
 

Field Detail

mediaInfoSet

protected Set<MediaInfo> mediaInfoSet
Constructor Detail

AbstractMedia

public AbstractMedia()
Method Detail

isEscape

@JSFProperty(tagExcluded=true)
public abstract boolean isEscape()
Overrides:
isEscape in class javax.faces.component.html.HtmlOutputText

getPreload

@JSFProperty(deferredValueType="java.lang.String")
public abstract String getPreload()
Returns the preloading behavior of the component. Default to null, which delegates preloading method selection to browser. Can be one of Browsers should use "metadata" preloading, if not specified.


isShowControls

@JSFProperty(deferredValueType="java.lang.Boolean",
             defaultValue="true")
public abstract boolean isShowControls()
This property is to show/hide browser's media controls. If true, browser's media controls are shown (default). If false, controls are not shown and page author needs to provide controls explicitly.


isLoop

@JSFProperty(deferredValueType="java.lang.Boolean",
             defaultValue="false")
public abstract boolean isLoop()
If this property is set, media will seek back to start when it reaches the end.

Returns:

isAutoplay

@JSFProperty(deferredValueType="java.lang.Boolean",
             defaultValue="false")
public abstract boolean isAutoplay()
If this property is set, media will start playing as soon as the page loads.

Returns:

addMediaInfo

public void addMediaInfo(MediaInfo... mediaInfo)
Description copied from interface: MediaSourceHolder
Add media info to media info array/collection.

Specified by:
addMediaInfo in interface MediaSourceHolder

getMediaInfos

public Set<MediaInfo> getMediaInfos()
Description copied from interface: MediaSourceHolder
Returns the MediaInfo instances held by this component.

Specified by:
getMediaInfos in interface MediaSourceHolder
Returns:


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.