org.icefaces.ace.component.audioplayer

## Class AudioPlayerBase

- java.lang.Object
- - javax.faces.component.UIComponent
  - - javax.faces.component.UIComponentBase
    - - org.icefaces.ace.component.audioplayer.AudioPlayerBase

- All Implemented Interfaces:
    java.util.EventListener, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, IAudioPlayer
  Direct Known Subclasses:
    AudioPlayer

      public abstract class AudioPlayerBase
      extends javax.faces.component.UIComponentBase
      implements IAudioPlayer

  This component renders an HTML5 audio element. The component can be bound to a variety of source types. Playback options can be controlled. JSF Resource management options are also available.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `AudioPlayerBase.PropertyKeys`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `COMPONENT_TYPE`
    `static java.lang.String` | `RENDERER_TYPE`

    - ### Fields inherited from class javax.faces.component.UIComponent

      `ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AudioPlayerBase()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getAccesskey()` Return the value of the `accesskey` property.
    `java.lang.String` | `getFamily()`
    `java.lang.String` | `getLibrary()` Return the value of the `library` property.
    `java.lang.String` | `getLinkLabel()` Return the value of the `linkLabel` property.
    `java.lang.String` | `getName()` Return the value of the `name` property.
    `java.lang.String` | `getPreload()` Return the value of the `preload` property.
    `java.lang.String` | `getScope()` Return the value of the `scope` property.
    `java.lang.String` | `getSrcAttribute()` Return the value of the `srcAttribute` property.
    `java.lang.String` | `getStyle()` Return the value of the `style` property.
    `java.lang.String` | `getStyleClass()` Return the value of the `styleClass` property.
    `java.lang.String` | `getType()` Return the value of the `type` property.
    `java.lang.String` | `getUrl()` Return the value of the `url` property.
    `java.lang.Object` | `getValue()` Return the value of the `value` property.
    `boolean` | `isAutoplay()` Return the value of the `autoplay` property.
    `boolean` | `isControls()` Return the value of the `controls` property.
    `boolean` | `isLoop()` Return the value of the `loop` property.
    `boolean` | `isMuted()` Return the value of the `muted` property.
    `protected boolean` | `isPropertySet(java.lang.String finder)`
    `void` | `setAccesskey(java.lang.String accesskey)` Set the value of the `accesskey` property.
    `void` | `setAutoplay(boolean autoplay)` Set the value of the `autoplay` property.
    `void` | `setControls(boolean controls)` Set the value of the `controls` property.
    `void` | `setLibrary(java.lang.String library)` Set the value of the `library` property.
    `void` | `setLinkLabel(java.lang.String linkLabel)` Set the value of the `linkLabel` property.
    `void` | `setLoop(boolean loop)` Set the value of the `loop` property.
    `void` | `setMuted(boolean muted)` Set the value of the `muted` property.
    `void` | `setName(java.lang.String name)` Set the value of the `name` property.
    `void` | `setPreload(java.lang.String preload)` Set the value of the `preload` property.
    `void` | `setScope(java.lang.String scope)` Set the value of the `scope` property.
    `void` | `setSrcAttribute(java.lang.String srcAttribute)` Set the value of the `srcAttribute` property.
    `void` | `setStyle(java.lang.String style)` Set the value of the `style` property.
    `void` | `setStyleClass(java.lang.String styleClass)` Set the value of the `styleClass` property.
    `void` | `setType(java.lang.String type)` Set the value of the `type` property.
    `void` | `setUrl(java.lang.String url)` Set the value of the `url` property.
    `void` | `setValue(java.lang.Object value)` Set the value of the `value` property.
    `void` | `setValueExpression(java.lang.String name, javax.el.ValueExpression binding)`

    - ### Methods inherited from class javax.faces.component.UIComponentBase

      `addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent`

    - ### Methods inherited from class javax.faces.component.UIComponent

      `encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, visitTree`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### COMPONENT_TYPE

          public static final java.lang.String COMPONENT_TYPE

      See Also:
        Constant Field Values

    - #### RENDERER_TYPE

          public static final java.lang.String RENDERER_TYPE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### AudioPlayerBase

          public AudioPlayerBase()

  - ### Method Detail

    - #### getFamily

          public java.lang.String getFamily()

      Specified by:
        `getFamily` in class `javax.faces.component.UIComponent`

    - #### setAccesskey

          public void setAccesskey(java.lang.String accesskey)

      Set the value of the `accesskey` property.

      Contents: Access key that, when pressed, transfers focus to this component.

      Specified by:
        `setAccesskey` in interface `IAudioPlayer`

    - #### getAccesskey

          public java.lang.String getAccesskey()

      Return the value of the `accesskey` property.

      Contents: Access key that, when pressed, transfers focus to this component.

      Specified by:
        `getAccesskey` in interface `IAudioPlayer`

    - #### setAutoplay

          public void setAutoplay(boolean autoplay)

      Set the value of the `autoplay` property.

      Contents: Will cause the media to automatically play when the page is load. This may be required for some older devices to play.

      Specified by:
        `setAutoplay` in interface `IAudioPlayer`

    - #### isAutoplay

          public boolean isAutoplay()

      Return the value of the `autoplay` property.

      Contents: Will cause the media to automatically play when the page is load. This may be required for some older devices to play. Default = 'false'.

      Specified by:
        `isAutoplay` in interface `IAudioPlayer`

    - #### setControls

          public void setControls(boolean controls)

      Set the value of the `controls` property.

      Contents: If "true", will render the media controls.

      Specified by:
        `setControls` in interface `IAudioPlayer`

    - #### isControls

          public boolean isControls()

      Return the value of the `controls` property.

      Contents: If "true", will render the media controls. Default = 'true'.

      Specified by:
        `isControls` in interface `IAudioPlayer`

    - #### setLibrary

          public void setLibrary(java.lang.String library)

      Set the value of the `library` property.

      Contents: The library used for JSF Resource registration.

      Specified by:
        `setLibrary` in interface `IAudioPlayer`

    - #### getLibrary

          public java.lang.String getLibrary()

      Return the value of the `library` property.

      Contents: The library used for JSF Resource registration.

      Specified by:
        `getLibrary` in interface `IAudioPlayer`

    - #### setLinkLabel

          public void setLinkLabel(java.lang.String linkLabel)

      Set the value of the `linkLabel` property.

      Contents: For certain devices, this adds the ability for a link to launch a system media player. If this attribute is present thelink will appear with this text as the label.

      Specified by:
        `setLinkLabel` in interface `IAudioPlayer`

    - #### getLinkLabel

          public java.lang.String getLinkLabel()

      Return the value of the `linkLabel` property.

      Contents: For certain devices, this adds the ability for a link to launch a system media player. If this attribute is present thelink will appear with this text as the label.

      Specified by:
        `getLinkLabel` in interface `IAudioPlayer`

    - #### setLoop

          public void setLoop(boolean loop)

      Set the value of the `loop` property.

      Contents: If "true", will play the the audio file repeatedly.

      Specified by:
        `setLoop` in interface `IAudioPlayer`

    - #### isLoop

          public boolean isLoop()

      Return the value of the `loop` property.

      Contents: If "true", will play the the audio file repeatedly. Default = 'false'.

      Specified by:
        `isLoop` in interface `IAudioPlayer`

    - #### setMuted

          public void setMuted(boolean muted)

      Set the value of the `muted` property.

      Contents: audio will be muted if true for html5 compliant desktop browsers only. Default is false

      Specified by:
        `setMuted` in interface `IAudioPlayer`

    - #### isMuted

          public boolean isMuted()

      Return the value of the `muted` property.

      Contents: audio will be muted if true for html5 compliant desktop browsers only. Default is false Default = 'false'.

      Specified by:
        `isMuted` in interface `IAudioPlayer`

    - #### setName

          public void setName(java.lang.String name)

      Set the value of the `name` property.

      Contents: The name is used for JSF Resource registration.

      Specified by:
        `setName` in interface `IAudioPlayer`

    - #### getName

          public java.lang.String getName()

      Return the value of the `name` property.

      Contents: The name is used for JSF Resource registration.

      Specified by:
        `getName` in interface `IAudioPlayer`

    - #### setPreload

          public void setPreload(java.lang.String preload)

      Set the value of the `preload` property.

      Contents: Options for preloading the resource. Accepted values are "auto" (allow the browser to decide), "none" or "metadata" (preload only the metadata).

      Specified by:
        `setPreload` in interface `IAudioPlayer`

    - #### getPreload

          public java.lang.String getPreload()

      Return the value of the `preload` property.

      Contents: Options for preloading the resource. Accepted values are "auto" (allow the browser to decide), "none" or "metadata" (preload only the metadata). Default = 'auto'.

      Specified by:
        `getPreload` in interface `IAudioPlayer`

    - #### setScope

          public void setScope(java.lang.String scope)

      Set the value of the `scope` property.

      Contents: The JSF Resource scope of the object resolving from the "value" attribute. It is only applicable when using a byte array or an instance of IceOutputResource as the value. Possible values are "flash", "request", "view", "session", and "application".

      Specified by:
        `setScope` in interface `IAudioPlayer`

    - #### getScope

          public java.lang.String getScope()

      Return the value of the `scope` property.

      Contents: The JSF Resource scope of the object resolving from the "value" attribute. It is only applicable when using a byte array or an instance of IceOutputResource as the value. Possible values are "flash", "request", "view", "session", and "application". Default = 'session'.

      Specified by:
        `getScope` in interface `IAudioPlayer`

    - #### setStyle

          public void setStyle(java.lang.String style)

      Set the value of the `style` property.

      Contents: Sets the CSS style definition to be applied to this component.

      Specified by:
        `setStyle` in interface `IAudioPlayer`

    - #### getStyle

          public java.lang.String getStyle()

      Return the value of the `style` property.

      Contents: Sets the CSS style definition to be applied to this component.

      Specified by:
        `getStyle` in interface `IAudioPlayer`

    - #### setStyleClass

          public void setStyleClass(java.lang.String styleClass)

      Set the value of the `styleClass` property.

      Contents: Sets the CSS class to apply to this component.

      Specified by:
        `setStyleClass` in interface `IAudioPlayer`

    - #### getStyleClass

          public java.lang.String getStyleClass()

      Return the value of the `styleClass` property.

      Contents: Sets the CSS class to apply to this component.

      Specified by:
        `getStyleClass` in interface `IAudioPlayer`

    - #### setType

          public void setType(java.lang.String type)

      Set the value of the `type` property.

      Contents: The mime type of media file.

      Specified by:
        `setType` in interface `IAudioPlayer`

    - #### getType

          public java.lang.String getType()

      Return the value of the `type` property.

      Contents: The mime type of media file.

      Specified by:
        `getType` in interface `IAudioPlayer`

    - #### setUrl

          public void setUrl(java.lang.String url)

      Set the value of the `url` property.

      Contents: The URL or src of the media file. If the "value" attribute is empty, the "url" attribute will be used.

      Specified by:
        `setUrl` in interface `IAudioPlayer`

    - #### getUrl

          public java.lang.String getUrl()

      Return the value of the `url` property.

      Contents: The URL or src of the media file. If the "value" attribute is empty, the "url" attribute will be used.

      Specified by:
        `getUrl` in interface `IAudioPlayer`

    - #### setValue

          public void setValue(java.lang.Object value)

      Set the value of the `value` property.

      Contents: The media source. The value may resolve to a byte array, the String of a file name, or a JSF Resource, if used in JSF project

      Specified by:
        `setValue` in interface `IAudioPlayer`

    - #### getValue

          public java.lang.Object getValue()

      Return the value of the `value` property.

      Contents: The media source. The value may resolve to a byte array, the String of a file name, or a JSF Resource, if used in JSF project

      Specified by:
        `getValue` in interface `IAudioPlayer`

    - #### setSrcAttribute

          public void setSrcAttribute(java.lang.String srcAttribute)

      Set the value of the `srcAttribute` property.

      Specified by:
        `setSrcAttribute` in interface `IAudioPlayer`

    - #### getSrcAttribute

          public java.lang.String getSrcAttribute()

      Return the value of the `srcAttribute` property.

      Specified by:
        `getSrcAttribute` in interface `IAudioPlayer`

    - #### isPropertySet

          protected boolean isPropertySet(java.lang.String finder)

    - #### setValueExpression

          public void setValueExpression(java.lang.String name,
                                         javax.el.ValueExpression binding)

      Overrides:
        `setValueExpression` in class `javax.faces.component.UIComponent`

Copyright 2025 ICEsoft Technologies Canada, Corp. All Rights Reserved.