OverviewSince 4.0 The ace:audioPlayer component renders an HTML5 <audio> element.
Getting StartedTo start using the AudioPlayer component it is enough to specify an audio resource in the value attribute and the MIME type of such resource in the 'type' attribute. <ace:audioPlayer id="audioPlayer" value="#{bean.resourcePath}" type="audio/mpeg" /> Attributes
The value attribute specifies an audio resource, which can either be a string representing a relative path to the audio file in the server, or a byte array that contains the encoded media, or a JSF resource. The controls flag will render the playback controls if set to true. The loop flag will cause the player to keep playing the media repeatedly. The autoplay flag will cause the media to be played at the moment the component is loaded on the page. If muted is set to true, the audio will be muted. Note that in many OS's, this attribute is not dynamic, meaning that it's not possible to change it programmatically. Once it is set to a certain value in the markup, it cannot be changed again at the markup level. However, the user will still be able to change it using the native player controls (if provided). The type attribute is used to specify the MIME type of the media file. Event ListenersNone. Client Behavior EventsNone. JavaScript APINot applicable. Keyboard SupportNone. CSS ClassesThe following markup represents the basic HTML structure of the component and the CSS classes it uses. <span class="mobi-audio [user defined classes]" style="[user defined styles]"> <audio></audio> <a></a> </span> Known Issues
Other NotesRegarding MIME types, it is known that certain application servers have certain default MIME types that are not supported by some browsers. It is advised to use the most standard MIME types so the videos can be played in all browsers. These are: audio/aac, Additional ResourcesTutorialsThis component appears in the following ICEfaces tutorials: None |
AudioPlayer
© Copyright 2021 ICEsoft Technologies Canada Corp.