media.video ViewHelper <vhs:media.video>
¶
Renders HTML code to embed a HTML5 video player. NOTICE: This is all HTML5 and won't work on browsers like IE8 and below. Include some helper library like videojs.com 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 video 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 video which is otherwise guessed from the filename's extension.
Arguments¶
additionalAttributes¶
- DataType
mixed
- Required
false
- Description
Additional tag attributes. They will be added directly to the resulting HTML tag.
data¶
- DataType
mixed
- Required
false
- Description
Additional data-* attributes. They will each be added with a "data-" prefix.
aria¶
- DataType
mixed
- Required
false
- Description
Additional aria-* attributes. They will each be added with a "aria-" prefix.
src¶
- DataType
mixed
- Required
true
- Description
Path to the media resource(s). Can contain single or multiple paths for videos/audio (either CSV, array or implementing Traversable).
relative¶
- DataType
boolean
- Default
true
- Required
false
- Description
If FALSE media URIs are rendered absolute. URIs in backend mode are always absolute.
class¶
- DataType
string
- Required
false
- Description
CSS class(es) for this element
dir¶
- DataType
string
- Required
false
- Description
Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)
id¶
- DataType
string
- Required
false
- Description
Unique (in this file) identifier for this HTML element.
lang¶
- DataType
string
- Required
false
- Description
Language for this element. Use short names specified in RFC 1766
style¶
- DataType
string
- Required
false
- Description
Individual CSS styles for this element
title¶
- DataType
string
- Required
false
- Description
Tooltip text of element
accesskey¶
- DataType
string
- Required
false
- Description
Keyboard shortcut to access this element
tabindex¶
- DataType
integer
- Required
false
- Description
Specifies the tab order of this element
onclick¶
- DataType
string
- Required
false
- Description
JavaScript evaluated for the onclick event
forceClosingTag¶
- DataType
boolean
- Required
false
- Description
If TRUE, forces the created tag to use a closing tag. If FALSE, allows self-closing tags.
hideIfEmpty¶
- DataType
boolean
- Required
false
- Description
Hide the tag completely if there is no tag content
contenteditable¶
- DataType
string
- Required
false
- Description
Specifies whether the contents of the element are editable.
draggable¶
- DataType
string
- Required
false
- Description
Specifies whether the element is draggable.
dropzone¶
- DataType
string
- Required
false
- Description
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¶
- DataType
string
- Required
false
- Description
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¶
- DataType
string
- Required
false
- Description
Specifies whether the element represents an element whose contents are subject to spell checking and grammar checking.
width¶
- DataType
integer
- Required
true
- Description
Sets the width of the video player in pixels.
height¶
- DataType
integer
- Required
true
- Description
Sets the height of the video player in pixels.
autoplay¶
- DataType
boolean
- Required
false
- Description
Specifies that the video will start playing as soon as it is ready.
controls¶
- DataType
boolean
- Required
false
- Description
Specifies that video controls should be displayed (such as a play/pause button etc).
loop¶
- DataType
boolean
- Required
false
- Description
Specifies that the video will start over again, every time it is finished.
muted¶
- DataType
boolean
- Required
false
- Description
Specifies that the audio output of the video should be muted.
poster¶
- DataType
string
- Required
false
- Description
Specifies an image to be shown while the video is downloading, or until the user hits the play button.
preload¶
- DataType
string
- Default
'auto'
- Required
false
- Description
Specifies if and how the author thinks the video should be loaded when the page loads. Can be "auto", "metadata" or "none".
unsupported¶
- DataType
string
- Required
false
- Description
Add a message for old browsers like Internet Explorer 9 without video support.