endSync

banner art
PreviousNext

endSync

The endSync attribute specifies the synchronization rule for child media elements within a parent time container.

Syntax

endSync ::= "first" | "last" | "all" | Id-value

Remarks

The WMS SMIL Playlist Parser plug-in enforces case sensitivity on the endSync attribute.

The endSync attribute can be applied only to an excl element, and it must have one of the following values.

Value Description
first The duration of the excl time container ends with the earliest active end of any child element in the container.
last The duration of the excl time container ends with the active end of the last child element that has a resolved begin time. This is the default behavior for an excl time container.
all The duration of the excl time container ends when all child elements in the container have ended their active durations. If any elements have indefinite or unresolved begin times, the simple duration of the time container will not end until the begin times have been resolved and the elements have finished playing.
id-value The duration of the excl time container ends with that of the specified child. The id value must identify one of the child elements in the time container.

First, last, and all are reserved values and must be escaped with a backslash to use them as id reference values. This is illustrated by the following example.

<?wsx version="1.0"?>
<smil>
  <media id="\first" src="c:\wmpub\wmroot\Clip_1.wmv" begin="0s" />
</smil>

The endSync attribute is particularly useful with child elements that have indeterminate duration. This includes live encoder feeds and media elements that have event-based end times.

If an element specifies both the endSync and dur attributes, the endSync attribute is ignored, and the simple duration of the element is defined by the value of dur.

If an element specifies both endSync and end but not dur, repeatDur, or repeatCount, then the endSync attribute is ignored.

  • Note   The "media" specifier is not supported.

Example Code

In the following example, the endSync attribute equals "first". The second media file and the stream from the encoder are never played, because the excl time container ends after Clip_1.wmv ends.

<?wsx version="1.0"?>
<smil>
  <excl endSync="first">
    <media src="c:\wmpub\wmroot\Clip_1.wmv" begin="0s" clipEnd="10s" />
    <media src="c:\wmpub\wmroot\Clip_2.wmv" begin="15s" dur="15s" />
    <media src="http://server_name:80" begin="eventSync.begin"/>
  </excl>
</smil>

If endsync equals "last", the first and second media files play, but the encoded stream does not because it has an indeterminate start time. If endsync equals "all", then all three media elements are played, but the encoded stream does not begin playing until the specified event is sent.

See Also

PreviousNext
Show:
© 2014 Microsoft