The end attribute specifies the timing value at which an element stops streaming data and ends. By default, the end attribute value is the natural end of the element.
Typically, the end attribute is used to stop a
media element before its natural end. Any timing value can
be used to define an end attribute value, but you will
probably find that an offset value is the most useful. For example,
an end attribute value of 30s
stops the element
30 seconds after it has begun. Time container elements can also
have end attribute values. These end attribute values
determine the point at which a time container will stop streaming
its child elements.
You can use the end attribute with a list of
semicolon-delimited event values to identify multiple times when
the element should end; for example
end="event1;event2;event3"
. This indicates that if any
of the events listed occurs, the element must stop playing. Time
values greater than the length of the element and negative time
values are ignored. For complete information about supported
end values, see Timing
values. For information about valid time formats, see Time formats.
In the following example, an excl element contains two
child media elements. The media element named Intro
plays as soon as the excl element begins. Ten seconds later,
Intro ends, because it has an end attribute value of
10s
. The media element named Music is
configured to begin as soon as Intro ends and to play for 25
seconds. But because the parent excl element is configured
to stop playing after its child elements have played for a total of
30 seconds, the child element Music will only be able to play for
20 seconds.
<?wsx version="1.0"?>
<smil>
<excl begin="0s" end="30s">
<media id="Intro" src="Audio1.wma" begin="0s" end="10s"/>
<media id="Music" src="MusicTrack.wma" begin="Intro.end" end="25s"/>
</excl>
</smil>
The end attribute can be specified for the following playlist elements:
Notes