ViewHelper Documentation
v:media.audio
Renders HTML code to embed a HTML5 audio player. NOTICE: This is all HTML5 and won't work on browsers like IE8 and below. Include some helper library like kolber.github.io/audiojs/ if you need to suport those. Source can be a single file, a CSV of files or an array of arrays with multiple sources for different audio formats. In the latter case provide array keys 'src' and 'type'. Providing an array of sources (even for a single source) is preferred as you can set the correct mime type of the audio which is otherwise guessed from the filename's extension.
Arguments
- src
- relative
- class
- dir
- id
- lang
- style
- title
- accesskey
- tabindex
- onclick
- forceClosingTag
- hideIfEmpty
- contenteditable
- contextmenu
- draggable
- dropzone
- translate
- spellcheck
- hidden
- width
- height
- autoplay
- controls
- loop
- muted
- poster
- preload
- unsupported
src anySimpleType
Path to the media resource(s). Can contain single or multiple paths for videos/audio (either CSV, array or implementing Traversable).
relative boolean
If FALSE media URIs are rendered absolute. URIs in backend mode are always absolute.
class string
CSS class(es) for this element
dir string
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id string
Unique (in this file) identifier for this HTML element.
lang string
Language for this element. Use short names specified in RFC 1766
style string
Individual CSS styles for this element
title string
Tooltip text of element
accesskey string
Keyboard shortcut to access this element
tabindex integer
Specifies the tab order of this element
onclick string
JavaScript evaluated for the onclick event
forceClosingTag boolean
If TRUE, forces the created tag to use a closing tag. If FALSE, allows self-closing tags.
hideIfEmpty boolean
Hide the tag completely if there is no tag content
contenteditable string
Specifies whether the contents of the element are editable.
contextmenu string
The value of the id attribute on the menu with which to associate the element as a context menu.
draggable string
Specifies whether the element is draggable.
dropzone string
Specifies what types of content can be dropped on the element, and instructs the UA about which actions to take with content when it is dropped on the element.
translate string
Specifies whether an elements attribute values and contents of its children are to be translated when the page is localized, or whether to leave them unchanged.
spellcheck string
Specifies whether the element represents an element whose contents are subject to spell checking and grammar checking.
hidden string
Specifies that the element represents an element that is not yet, or is no longer, relevant.
width integer
Sets the width of the audio player in pixels.
height integer
Sets the height of the audio player in pixels.
autoplay boolean
Specifies that the audio will start playing as soon as it is ready.
controls boolean
Specifies that audio controls should be displayed (such as a play/pause button etc).
loop boolean
Specifies that the audio will start over again, every time it is finished.
muted boolean
Specifies that the audio output of the audio should be muted.
poster string
Specifies an image to be shown while the audio is downloading, or until the user hits the play button.
preload string
Specifies if and how the author thinks the audio should be loaded when the page loads. Can be "auto", "metadata" or "none".
unsupported string
Add a message for old browsers like Internet Explorer 9 without audio support.