SMIL Media Elements
SMIL uses media element to describe content.
Media Elements
The following media elements can be used to include media objects in a SMIL
document:
| Element |
Description |
Ver |
| <animation> |
Defines an animation |
1 |
| <audio> |
Defines an audio clip |
1 |
| <brush> |
Defines a brush |
1 |
| <img> |
Defines an image |
1 |
| <param> |
Defines a parameter |
1 |
| <ref> |
Defines a generic media reference |
1 |
| <text> |
Defines a text |
1 |
| <textstream> |
Defines a texstream |
1 |
| <video> |
Defines a video |
1 |
Media Attributes
Each media object in a SMIL document must be included using a reference (URL)
in the src attribute. The src attribute is the most commonly used attribute for
media elements.
The type attribute is used to define the media type. If the type attribute is
omitted the application should rely on the type information communicated by the
server. Developers should not rely on the file type extension to define the file
type.
| Attribute |
Description |
Ver |
| erase |
Defines the behavior of the element after any timing is
complete |
1 |
| src |
Defines the source of a media object |
1 |
| type |
Defines the media type |
1 |
For a full list of SMIL elements and attributes:
W3Schools SMIL Reference.
The <animation> Element
The <animation> element defines a reference to an animation object stored as vector graphics or
in another animated format.
The <animation> element should not be confused with the <animate> element.
The <animation> element defines an animation object by reference. The <animate>
elements defines the animation of other elements.
The <audio> Element
The <audio> element defines a reference to an audio object stored as recorded
audio.
Example:
<html xmlns:t="urn:schemas-microsoft-com:time">
<head>
<?import namespace="t" implementation="#default#time2">
</head>
<body>
<t:audio
src="liar.wav"
repeatCount="indefinite"
type="wav" />
</body>
</html>
|
Click here to try it yourself.
The <brush> Element
The <brush> element defines a fill color or fill pattern.
The element defines painting a color or a pattern in place of a media object.
The <img> Element
The <img> element defines a reference to an image object stored as JPG or an
other image format.
Example: <img src="myimage.gif" type="GIF" />
The <param> Element
The <param> element defines a parameter to any other media element.
Example: <param name="color" value="red" />
The <ref> Element
The <ref> element defines a reference to a generic media object.
The <ref> element can be used when the media type is not well defined.
The <text> Element
The <text> element defines a reference to a text object stored as text.
The <textstream> Element
The <textstream> element defines a reference to an text object stored as
a text-stream.
The <video> Element
The <video> element defines a reference to a video object stored as recorded
video.
Example:
<html xmlns:t="urn:schemas-microsoft-com:time">
<head>
<?import namespace="t" implementation="#default#time2">
</head>
<body>
<t:video
src="http://www.ananova.com/about/vap_windows_check.wmv"
repeatCount="indefinite"
type="wmv" />
</body>
</html>
|
Click here to try it yourself.
Unlimited Disk and Transfer Hosting - New from Go Daddy!
Go Daddy Unlimited Hosting is the reliable, cost-effective
choice for site owners who want superior speed and reliability.
Available for Linux or Windows, our Unlimited Hosting accounts
come with unlimited disk space and bandwidth, 1,000 email
accounts, 50 MySQL Databases, a FREE SSL Certificate and over
50 FREE downloadable applications and utilities available through
our exclusive Hosting Connections. Count on the world’s largest
hostname provider to keep your site up and running—even when you’re not!
Take the uncertainty out of Web hosting and let GoDaddy.com
put service, performance and value back in. No matter which
hosting type or plan you choose, your site receives 24/7
maintenance and protection in our world-class data center.
Virtual Dedicated, Dedicated Server and unlimited plans also available.
Save 10% on web hosting - Enter code w3tenoff at checkout
 |
|
Get Your Diploma!
W3Schools' Online Certification Program is the perfect solution for busy
professionals who need to balance work, family, and career building.
The HTML Certificate is for developers who want to document their knowledge of HTML, XHTML, and CSS.
The JavaScript Certificate is for developers who want to document their knowledge of JavaScript and the HTML DOM.
The ASP Certificate is for developers who want to document their knowledge of ASP, SQL, and ADO.
|
|