The endSync attribute enables you to base the end of an excl element on the end of one of its child elements.
The endSync attribute is used in situations in which child elements in an excl element can be activated randomly, such as through a program created using the Windows Media Services Software Development Kit (SDK). In these cases, the elements' begin attribute values or durations may be undetermined when the playlist is created, and the endSync attribute provides a way to control playback within the excl container after the playlist is online. The endSync attribute is particularly useful for an excl element that contains child elements of unknown durations or whose end is based on a particular event.
The endSync attribute can have the following values.
||Specifies that the excl element ends after the first active child element ends.|
||Specifies that the excl element ends after all child elements that have a resolved begin attribute value end. Elements with an unresolved begin attribute value will prevent the excl element from ending because the duration cannot be determined.|
||Specifies that the excl element ends when the child element with the specifed id attribute value ends.|
||Specifies that the excl element ends when the last active child element with a resolved and definite begin attribute value ends. If there are no children with a resolved begin attribute value, the excl element ends immediately.|
When you specify an endSync attribute value for an excl element, you define the duration of the excl element based on the duration of its child elements. The following rules dictate how the playlist evaluates the endSync attribute value:
lastand child elements that are paused, the excl element cannot end until the paused children resume or otherwise end.
In the following example, the endSync attribute value is
first. The second and third media elements are
never played because the excl element ends after the first
media element, 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://encoder_name:80" begin="Event1" /> </excl> </smil>
However, if the endSync attribute value in this example
was equal to
last, the first and second media
elements would play, but the third media element would not,
because it has an indeterminate start time. If the endSync
attribute value in this example was equal to
three media elements would play, but the element that
sources from an encoder would not start playing until the event
specified by the begin attribute occurs.
The endSync attribute can be specified for the following playlist element:
last, by default.