Parallel Clips
As you noticed in the last practice example, playback regions can
define where media play, but not when. This is the default behavior
for media when no timing tags are provided in the SMIL file. But
what if you want to play more than one at a time? SMIL includes
timing tags for this purpose.
The parallel tag indicates that one or more clips should be played
at the same time (in parallel). It encloses the clips that form
the "parallel" group. In the example below, all of the
clips play/display simultaneously:
<par>
<audio src="rtsp://realserver.bu.edu:554/a/v/av/nis/training/smil/driving.rm"/>
<img region ="one" src="rtsp://realserver.bu.edu:554/a/v/av/nis/training/smil/one.gif"/>
<img region ="two" src="rtsp://realserver.bu.edu:554/a/v/av/nis/training/smil/two.gif"/>
<img region ="three" src="rtsp://realserver.bu.edu:554/a/v/av/nis/training/smil/three.gif"/>
</par>
You can end a group of clips at the same time by using the endsync
attribute with the <par> tag.
Use the attribute endsync="first" to stop
the <par> group when the clip with the shortest
timeline finishes playing. All other clips in the group stop playing
at that point, regardless of their playback status or any timing
parameters specified for them.
The attribute endsync="last" causes the
<par> group to conclude when all clips have finished
playing. Because this is the default value, you can omit the endsync
attribute from the <par> tag to achieve this
effect.
The attribute endsync="id(clip ID)" causes
the <par> group to conclude when a designated
clip reaches its end. All other clips in the group stop playing
at that point, regardless of their playback status or any timing
parameters used with them. The designated clip must have a corresponding
id value in its source tag.
|