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.
Of course, in the real world, it's unlikely that you'll be using a single media clip within your SMIL file. And as the number of elements increases, so does the need for synchronization between them. Which is why SMIL includes three synchronization elements, designed to address your most common needs.
The first of these is the <seq> element, which allows you to group a bunch of elements together and play them back sequentially. Here's an example:
In this case, the two audio files are played sequentially,
one after the other. Obviously, you can exert further control over the manner in which they are displayed by placing appropriate "begin", "dur" and "end" attributes for each element.
In this case, the first audio file would begin playing 5
seconds into the clip, die after 2 seconds, and would be immediately followed by the second file, which would play all the way through.
SMIL also allows you to play back media in parallel, rather than sequentially, via the <par> grouping element. Consider the following variant of the previous example, in which both audio files are played simultaneously in their respective regions:
Obviously, "begin" and "dur" attributes can be used here as
well – consider the following example, which plays back an audio file and an image in parallel; the audio file repeats 5 times, with the image appearing on the second iteration:
Finally, SMIL also provides the <excl> synchronization
element, which allows you to create a group of media clips and play them, one at a time, in a pre-defined order. Only one media clip within an <excl> group can be played at any time; parallel play is not permitted within such a block.