Take a tour of SMIL, the Synchronized Multimedia Integration Language, and find out how you can use it to quickly and rapidly build Web-based multimedia offerings incorporating multiple media types.
SMIL also includes a fairly sophisticated timing model which allows you to control the timing and synchronization of media objects within the lifetime of the SMIL presentation. Basic timing support is made available via the "begin" and "dur" attributes, which allow you to specify a start time and duration respectively for the media. Values for these attributes may be specified in terms of time values or event notifications. Here's an example:
This would set up a clip of total duration 25 seconds, with
the image appearing 5 seconds into the clip.
It's also possible to explicitly terminate playback of a media clip before it gets to the end of its normal lifetime with SMIL's "end" attribute. Consider the following example, which demonstrates by ending a 10-second audio clip after 6 seconds.
It's also possible to begin or end clips on specific events,
such as a mouse click or the start of any other media clip within the document. Consider the following example, which plays a video clip; the clip ends when the user clicks the mouse on it.
A number of other options are available for event-based
timing in SMIL – take a look at the specification for a complete list, together with usage examples.