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

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
                      extended by org.apache.myfaces.html5.component.media.Media
All Implemented Interfaces:
EventListener, javax.faces.component.behavior.ClientBehaviorHolder, 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:
AbstractAudio, AbstractVideo

public class Media
extends AbstractMedia
implements javax.faces.component.behavior.ClientBehaviorHolder


Field Summary
static String COMPONENT_FAMILY
           
static String COMPONENT_TYPE
           
 
Fields inherited from class org.apache.myfaces.html5.component.media.AbstractMedia
mediaInfoSet
 
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
Media()
           
 
Method Summary
 String getAccesskey()
          HTML: Sets the access key for this element.
 String getAnimationEnd()
          HTML : Script to run when the animation ends on Html element.
 String getDefaultEventName()
           
 String getDir()
          HTML: The direction of text display, either 'ltr' (left-to-right) or 'rtl' (right-to-left).
 Collection<String> getEventNames()
           
 String getFamily()
           
 String getLang()
          HTML: The base language of this document.
 String getOnblur()
          HTML: Specifies a script to be invoked when the element loses focus.
 String getOnclick()
          HTML: Script to be invoked when the element is clicked.
 String getOndblclick()
          HTML: Script to be invoked when the element is double-clicked.
 String getOndrag()
          HTML: Handler for event that is fired when the element is dragged.
 String getOndragend()
          HTML: Handler for event that is fired when the drag operation is ended.
 String getOndragenter()
          HTML: Handler for event that is fired when the element is dragged into a valid drop target.
 String getOndragleave()
          HTML: Handler for event that is fired when the element leaves a valid drop target.
 String getOndragover()
          HTML: Handler for event that is fired when the element is being dragged over a valid drop target.
 String getOndragstart()
          HTML: Handler for event that is fired when the drag operation starts.
 String getOndrop()
          HTML: Handler for event that is fired when the element is being dropped.
 String getOnended()
          HTML: Handler for event that is fired when the playback has stopped because the end of the media resource was reached.
 String getOnerror()
          HTML: Handler for event that is fired when an error occurs while fetching the media data.
 String getOnfocus()
          HTML: Specifies a script to be invoked when the element receives focus.
 String getOnkeydown()
          HTML: Script to be invoked when a key is pressed down over this element.
 String getOnkeypress()
          HTML: Script to be invoked when a key is pressed over this element.
 String getOnkeyup()
          HTML: Script to be invoked when a key is released over this element.
 String getOnloadeddata()
          HTML: Handler for event that is fired when browser can render the media data at the current playback position for the first time.
 String getOnloadedmetadata()
          HTML: Handler for event that is fired when browser has just determined the duration and dimensions of the media resource and the timed tracks are ready.
 String getOnloadstart()
          HTML: Handler for event that is fired when browser begins looking for media data, as part of the resource selection algorithm.
 String getOnmousedown()
          HTML: Script to be invoked when the pointing device is pressed over this element.
 String getOnmousemove()
          HTML: Script to be invoked when the pointing device is moved while it is in this element.
 String getOnmouseout()
          HTML: Script to be invoked when the pointing device is moves out of this element.
 String getOnmouseover()
          HTML: Script to be invoked when the pointing device is moved into this element.
 String getOnmouseup()
          HTML: Script to be invoked when the pointing device is released over this element.
 String getOnmousewheel()
          HTML: Script to be invoked when the pointing device is wheeled over this element.
 String getOnpause()
          HTML: Handler for event that is fired when the playback has been paused.
 String getOnplay()
          HTML: Handler for event that is fired when the playback has begun.
 String getOnplaying()
          HTML: Handler for event that is fired when the playback has started.
 String getOnprogress()
          HTML: Handler for event that is fired while browser is fetching media data.
 String getOnseeked()
          HTML: Handler for event that is fired when a seek operation is finished.
 String getOnseeking()
          HTML: Handler for event that is fired if the seek operation is taking long enough that the browser has time to fire the event.
 String getOnvolumechange()
          HTML: Handler for event that is fired when either the volume attribute or the muted attribute has changed.
 String getOnwaiting()
          HTML: Handler for event that is fired when the playback has stopped because the next frame is not available, but the user agent expects that frame to become available in due course.
 String getPreload()
          Returns the preloading behavior of the component.
 String getStyle()
          HTML: CSS styling instructions.
 String getStyleClass()
          The CSS class for this element.
 String getTabindex()
          HTML: Specifies the position of this element within the tab order of the document.
 String getTitle()
          HTML: An advisory title for this element.
 boolean isAutoplay()
          If this property is set, media will start playing as soon as the page loads.
 boolean isDraggable()
          HTML: Specifies whether the element is draggable.
 boolean isEscape()
           
 boolean isHidden()
          HTML: Whether the element is relevant.
 boolean isLoop()
          If this property is set, media will seek back to start when it reaches the end.
 boolean isShowControls()
          This property is to show/hide browser's media controls.
 void setAccesskey(String accesskey)
           
 void setAnimationEnd(String animationEnd)
           
 void setAutoplay(boolean autoplay)
           
 void setDir(String dir)
           
 void setDraggable(boolean draggable)
           
 void setEscape(boolean escape)
           
 void setHidden(boolean hidden)
           
 void setLang(String lang)
           
 void setLoop(boolean loop)
           
 void setOnblur(String onblur)
           
 void setOnclick(String onclick)
           
 void setOndblclick(String ondblclick)
           
 void setOndrag(String ondrag)
           
 void setOndragend(String ondragend)
           
 void setOndragenter(String ondragenter)
           
 void setOndragleave(String ondragleave)
           
 void setOndragover(String ondragover)
           
 void setOndragstart(String ondragstart)
           
 void setOndrop(String ondrop)
           
 void setOnended(String onended)
           
 void setOnerror(String onerror)
           
 void setOnfocus(String onfocus)
           
 void setOnkeydown(String onkeydown)
           
 void setOnkeypress(String onkeypress)
           
 void setOnkeyup(String onkeyup)
           
 void setOnloadeddata(String onloadeddata)
           
 void setOnloadedmetadata(String onloadedmetadata)
           
 void setOnloadstart(String onloadstart)
           
 void setOnmousedown(String onmousedown)
           
 void setOnmousemove(String onmousemove)
           
 void setOnmouseout(String onmouseout)
           
 void setOnmouseover(String onmouseover)
           
 void setOnmouseup(String onmouseup)
           
 void setOnmousewheel(String onmousewheel)
           
 void setOnpause(String onpause)
           
 void setOnplay(String onplay)
           
 void setOnplaying(String onplaying)
           
 void setOnprogress(String onprogress)
           
 void setOnseeked(String onseeked)
           
 void setOnseeking(String onseeking)
           
 void setOnvolumechange(String onvolumechange)
           
 void setOnwaiting(String onwaiting)
           
 void setPreload(String preload)
           
 void setShowControls(boolean showControls)
           
 void setStyle(String style)
           
 void setStyleClass(String styleClass)
           
 void setTabindex(String tabindex)
           
 void setTitle(String title)
           
 
Methods inherited from class org.apache.myfaces.html5.component.media.AbstractMedia
addMediaInfo, getMediaInfos
 
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, 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 javax.faces.component.behavior.ClientBehaviorHolder
addClientBehavior, getClientBehaviors
 

Field Detail

COMPONENT_FAMILY

public static final String COMPONENT_FAMILY
See Also:
Constant Field Values

COMPONENT_TYPE

public static final String COMPONENT_TYPE
See Also:
Constant Field Values
Constructor Detail

Media

public Media()
Method Detail

getFamily

public String getFamily()
Overrides:
getFamily in class javax.faces.component.html.HtmlOutputText

getEventNames

public Collection<String> getEventNames()
Specified by:
getEventNames in interface javax.faces.component.behavior.ClientBehaviorHolder
Overrides:
getEventNames in class javax.faces.component.UIComponentBase

getDefaultEventName

public String getDefaultEventName()
Specified by:
getDefaultEventName in interface javax.faces.component.behavior.ClientBehaviorHolder
Overrides:
getDefaultEventName in class javax.faces.component.UIComponentBase

isEscape

public boolean isEscape()
Specified by:
isEscape in class AbstractMedia

setEscape

public void setEscape(boolean escape)
Overrides:
setEscape in class javax.faces.component.html.HtmlOutputText

getPreload

public String getPreload()
Description copied from class: AbstractMedia
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.

Specified by:
getPreload in class AbstractMedia

setPreload

public void setPreload(String preload)

isShowControls

public boolean isShowControls()
Description copied from class: AbstractMedia
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.

Specified by:
isShowControls in class AbstractMedia

setShowControls

public void setShowControls(boolean showControls)

isLoop

public boolean isLoop()
Description copied from class: AbstractMedia
If this property is set, media will seek back to start when it reaches the end.

Specified by:
isLoop in class AbstractMedia
Returns:

setLoop

public void setLoop(boolean loop)

isAutoplay

public boolean isAutoplay()
Description copied from class: AbstractMedia
If this property is set, media will start playing as soon as the page loads.

Specified by:
isAutoplay in class AbstractMedia
Returns:

setAutoplay

public void setAutoplay(boolean autoplay)

getAccesskey

public String getAccesskey()
Description copied from interface: AccesskeyProperty
HTML: Sets the access key for this element.

Specified by:
getAccesskey in interface AccesskeyProperty

setAccesskey

public void setAccesskey(String accesskey)

getOnclick

public String getOnclick()
Description copied from interface: MouseEventProperties
HTML: Script to be invoked when the element is clicked.

Specified by:
getOnclick in interface GlobalEventProperties
Specified by:
getOnclick in interface MouseEventProperties

setOnclick

public void setOnclick(String onclick)

getOndblclick

public String getOndblclick()
Description copied from interface: MouseEventProperties
HTML: Script to be invoked when the element is double-clicked.

Specified by:
getOndblclick in interface GlobalEventProperties
Specified by:
getOndblclick in interface MouseEventProperties

setOndblclick

public void setOndblclick(String ondblclick)

getOnblur

public String getOnblur()
Description copied from interface: GlobalEventProperties
HTML: Specifies a script to be invoked when the element loses focus.

Specified by:
getOnblur in interface GlobalEventProperties

setOnblur

public void setOnblur(String onblur)

getOnfocus

public String getOnfocus()
Description copied from interface: GlobalEventProperties
HTML: Specifies a script to be invoked when the element receives focus.

Specified by:
getOnfocus in interface GlobalEventProperties

setOnfocus

public void setOnfocus(String onfocus)

getOnmousedown

public String getOnmousedown()
Description copied from interface: MouseEventProperties
HTML: Script to be invoked when the pointing device is pressed over this element.

Specified by:
getOnmousedown in interface MouseEventProperties

setOnmousedown

public void setOnmousedown(String onmousedown)

getOnmousemove

public String getOnmousemove()
Description copied from interface: MouseEventProperties
HTML: Script to be invoked when the pointing device is moved while it is in this element.

Specified by:
getOnmousemove in interface MouseEventProperties

setOnmousemove

public void setOnmousemove(String onmousemove)

getOnmouseout

public String getOnmouseout()
Description copied from interface: MouseEventProperties
HTML: Script to be invoked when the pointing device is moves out of this element.

Specified by:
getOnmouseout in interface MouseEventProperties

setOnmouseout

public void setOnmouseout(String onmouseout)

getOnmouseover

public String getOnmouseover()
Description copied from interface: MouseEventProperties
HTML: Script to be invoked when the pointing device is moved into this element.

Specified by:
getOnmouseover in interface MouseEventProperties

setOnmouseover

public void setOnmouseover(String onmouseover)

getOnmouseup

public String getOnmouseup()
Description copied from interface: MouseEventProperties
HTML: Script to be invoked when the pointing device is released over this element.

Specified by:
getOnmouseup in interface MouseEventProperties

setOnmouseup

public void setOnmouseup(String onmouseup)

getOnmousewheel

public String getOnmousewheel()
Description copied from interface: Html5GlobalProperties
HTML: Script to be invoked when the pointing device is wheeled over this element.

Specified by:
getOnmousewheel in interface Html5GlobalProperties
Specified by:
getOnmousewheel in interface MouseEventProperties

setOnmousewheel

public void setOnmousewheel(String onmousewheel)

getDir

public String getDir()
Description copied from interface: Html5GlobalProperties
HTML: The direction of text display, either 'ltr' (left-to-right) or 'rtl' (right-to-left).

Specified by:
getDir in interface Html5GlobalProperties
Overrides:
getDir in class javax.faces.component.html.HtmlOutputText

setDir

public void setDir(String dir)
Overrides:
setDir in class javax.faces.component.html.HtmlOutputText

getLang

public String getLang()
Description copied from interface: Html5GlobalProperties
HTML: The base language of this document.

Specified by:
getLang in interface Html5GlobalProperties
Overrides:
getLang in class javax.faces.component.html.HtmlOutputText

setLang

public void setLang(String lang)
Overrides:
setLang in class javax.faces.component.html.HtmlOutputText

getTitle

public String getTitle()
Description copied from interface: Html5GlobalProperties
HTML: An advisory title for this element. Often used by the user agent as a tooltip.

Specified by:
getTitle in interface Html5GlobalProperties
Overrides:
getTitle in class javax.faces.component.html.HtmlOutputText

setTitle

public void setTitle(String title)
Overrides:
setTitle in class javax.faces.component.html.HtmlOutputText

getStyle

public String getStyle()
Description copied from interface: Html5GlobalProperties
HTML: CSS styling instructions.

Specified by:
getStyle in interface Html5GlobalProperties
Overrides:
getStyle in class javax.faces.component.html.HtmlOutputText

setStyle

public void setStyle(String style)
Overrides:
setStyle in class javax.faces.component.html.HtmlOutputText

getStyleClass

public String getStyleClass()
Description copied from interface: Html5GlobalProperties
The CSS class for this element. Corresponds to the HTML 'class' attribute.

Specified by:
getStyleClass in interface Html5GlobalProperties
Overrides:
getStyleClass in class javax.faces.component.html.HtmlOutputText

setStyleClass

public void setStyleClass(String styleClass)
Overrides:
setStyleClass in class javax.faces.component.html.HtmlOutputText

isHidden

public boolean isHidden()
Description copied from interface: Html5GlobalProperties
HTML: Whether the element is relevant.

Specified by:
isHidden in interface Html5GlobalProperties

setHidden

public void setHidden(boolean hidden)

isDraggable

public boolean isDraggable()
Description copied from interface: Html5GlobalProperties
HTML: Specifies whether the element is draggable.

Specified by:
isDraggable in interface Html5GlobalProperties

setDraggable

public void setDraggable(boolean draggable)
Specified by:
setDraggable in interface Draggable

getOndrag

public String getOndrag()
Description copied from interface: Html5GlobalProperties
HTML: Handler for event that is fired when the element is dragged.

Specified by:
getOndrag in interface Html5GlobalProperties

setOndrag

public void setOndrag(String ondrag)

getOndragend

public String getOndragend()
Description copied from interface: Html5GlobalProperties
HTML: Handler for event that is fired when the drag operation is ended. Successfully or not, this handler will run.

Specified by:
getOndragend in interface Html5GlobalProperties

setOndragend

public void setOndragend(String ondragend)

getOndragenter

public String getOndragenter()
Description copied from interface: Html5GlobalProperties
HTML: Handler for event that is fired when the element is dragged into a valid drop target.

Specified by:
getOndragenter in interface Html5GlobalProperties

setOndragenter

public void setOndragenter(String ondragenter)

getOndragleave

public String getOndragleave()
Description copied from interface: Html5GlobalProperties
HTML: Handler for event that is fired when the element leaves a valid drop target.

Specified by:
getOndragleave in interface Html5GlobalProperties

setOndragleave

public void setOndragleave(String ondragleave)

getOndragover

public String getOndragover()
Description copied from interface: Html5GlobalProperties
HTML: Handler for event that is fired when the element is being dragged over a valid drop target.

Specified by:
getOndragover in interface Html5GlobalProperties

setOndragover

public void setOndragover(String ondragover)

getOndragstart

public String getOndragstart()
Description copied from interface: Html5GlobalProperties
HTML: Handler for event that is fired when the drag operation starts.

Specified by:
getOndragstart in interface Html5GlobalProperties

setOndragstart

public void setOndragstart(String ondragstart)

getOndrop

public String getOndrop()
Description copied from interface: Html5GlobalProperties
HTML: Handler for event that is fired when the element is being dropped.

Specified by:
getOndrop in interface Html5GlobalProperties

setOndrop

public void setOndrop(String ondrop)

getAnimationEnd

public String getAnimationEnd()
Description copied from interface: Html5GlobalProperties
HTML : Script to run when the animation ends on Html element.

Specified by:
getAnimationEnd in interface Html5GlobalProperties

setAnimationEnd

public void setAnimationEnd(String animationEnd)

getOnkeydown

public String getOnkeydown()
Description copied from interface: KeyEventProperties
HTML: Script to be invoked when a key is pressed down over this element.

Specified by:
getOnkeydown in interface KeyEventProperties

setOnkeydown

public void setOnkeydown(String onkeydown)

getOnkeypress

public String getOnkeypress()
Description copied from interface: KeyEventProperties
HTML: Script to be invoked when a key is pressed over this element.

Specified by:
getOnkeypress in interface KeyEventProperties

setOnkeypress

public void setOnkeypress(String onkeypress)

getOnkeyup

public String getOnkeyup()
Description copied from interface: KeyEventProperties
HTML: Script to be invoked when a key is released over this element.

Specified by:
getOnkeyup in interface KeyEventProperties

setOnkeyup

public void setOnkeyup(String onkeyup)

getOnended

public String getOnended()
Description copied from interface: MediaEventProperties
HTML: Handler for event that is fired when the playback has stopped because the end of the media resource was reached.

Specified by:
getOnended in interface MediaEventProperties

setOnended

public void setOnended(String onended)

getOnerror

public String getOnerror()
Description copied from interface: MediaEventProperties
HTML: Handler for event that is fired when an error occurs while fetching the media data.

Specified by:
getOnerror in interface MediaEventProperties

setOnerror

public void setOnerror(String onerror)

getOnloadeddata

public String getOnloadeddata()
Description copied from interface: MediaEventProperties
HTML: Handler for event that is fired when browser can render the media data at the current playback position for the first time.

Specified by:
getOnloadeddata in interface MediaEventProperties

setOnloadeddata

public void setOnloadeddata(String onloadeddata)

getOnloadedmetadata

public String getOnloadedmetadata()
Description copied from interface: MediaEventProperties
HTML: Handler for event that is fired when browser has just determined the duration and dimensions of the media resource and the timed tracks are ready.

Specified by:
getOnloadedmetadata in interface MediaEventProperties

setOnloadedmetadata

public void setOnloadedmetadata(String onloadedmetadata)

getOnloadstart

public String getOnloadstart()
Description copied from interface: MediaEventProperties
HTML: Handler for event that is fired when browser begins looking for media data, as part of the resource selection algorithm.

Specified by:
getOnloadstart in interface MediaEventProperties

setOnloadstart

public void setOnloadstart(String onloadstart)

getOnpause

public String getOnpause()
Description copied from interface: MediaEventProperties
HTML: Handler for event that is fired when the playback has been paused. Fired after the pause() method has returned.

Specified by:
getOnpause in interface MediaEventProperties

setOnpause

public void setOnpause(String onpause)

getOnplay

public String getOnplay()
Description copied from interface: MediaEventProperties
HTML: Handler for event that is fired when the playback has begun. Fired after the play() method has returned, or when the autoplay attribute has caused playback to begin.

Specified by:
getOnplay in interface MediaEventProperties

setOnplay

public void setOnplay(String onplay)

getOnplaying

public String getOnplaying()
Description copied from interface: MediaEventProperties
HTML: Handler for event that is fired when the playback has started.

Specified by:
getOnplaying in interface MediaEventProperties

setOnplaying

public void setOnplaying(String onplaying)

getOnprogress

public String getOnprogress()
Description copied from interface: MediaEventProperties
HTML: Handler for event that is fired while browser is fetching media data.

Specified by:
getOnprogress in interface MediaEventProperties

setOnprogress

public void setOnprogress(String onprogress)

getOnseeked

public String getOnseeked()
Description copied from interface: MediaEventProperties
HTML: Handler for event that is fired when a seek operation is finished.

Specified by:
getOnseeked in interface MediaEventProperties

setOnseeked

public void setOnseeked(String onseeked)

getOnseeking

public String getOnseeking()
Description copied from interface: MediaEventProperties
HTML: Handler for event that is fired if the seek operation is taking long enough that the browser has time to fire the event.

Specified by:
getOnseeking in interface MediaEventProperties

setOnseeking

public void setOnseeking(String onseeking)

getOnvolumechange

public String getOnvolumechange()
Description copied from interface: MediaEventProperties
HTML: Handler for event that is fired when either the volume attribute or the muted attribute has changed. Fired after the relevant attribute's setter has returned.

Specified by:
getOnvolumechange in interface MediaEventProperties

setOnvolumechange

public void setOnvolumechange(String onvolumechange)

getOnwaiting

public String getOnwaiting()
Description copied from interface: MediaEventProperties
HTML: Handler for event that is fired when the playback has stopped because the next frame is not available, but the user agent expects that frame to become available in due course.

Specified by:
getOnwaiting in interface MediaEventProperties

setOnwaiting

public void setOnwaiting(String onwaiting)

getTabindex

public String getTabindex()
Description copied from interface: TabindexProperty
HTML: Specifies the position of this element within the tab order of the document.

Specified by:
getTabindex in interface TabindexProperty

setTabindex

public void setTabindex(String tabindex)


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