References a single video asset. mcs:video can contain one or more mcs:video-source elements. MCS processes mcs:video-source elements in the order you list them. If the first content type is invalid or is not supported by the device, then the next element will be examined. If the list does not contain any formats supported by the device, then the contents of mcs:video-fallback will be processed.
MCS uses the device repository to determine whether or not the given content type is supported by the device. The repository contains information about the built-in browser capabilities, i.e. it does not take into account extensions/plugins that can be installed on the device by the user.
The width and height properties defined for an mcs:video element are applied either to the video element or an image corresponding to the policy specified by the poster attribute. Other styles defined for mcs:video, as well as styles defined for the mcs:video-source and mcs:video-fallback elements are ignored.
Attribute | Description | Type | Default | Options | Use |
---|---|---|---|---|---|
src | The URI of the resource. The path should be relative and it will be resolved against the current project assets base URL. | xs:anyURI | required | ||
type | Content type of the element's content. | xs:string | video/mp4, video/ogg, video/webm, video/3gpp, application/x-shockwave-flash | required |
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/2002/06/xhtml2"
xmlns:mcs="http://www.volantis.com/xmlns/2006/01/xdime/mcs">
<head>
<title>mcs:video</title>
</head>
<body>
<div>
<mcs:video poster="/images/video-poster.mimg" style="width: 95%;">
<mcs:video-source src="movie.swf" type="application/x-shockwave-flash"/>
<mcs:video-source src="movie.mp4" type="video/mp4"/>
<mcs:video-source src="movie.webm" type="video/webm"/>
<mcs:video-source src="movie.3gp" type="video/3gpp"/>
<mcs:video-fallback>
<p>Video formats are not supported on this device.
<a href="http://www.mysite.com">Learn more...</a>
</p>
</mcs:video-fallback>
</mcs:video>
</div>
</body>
</html>