The repeatCount attribute specifies how many times an
element repeats. For example, a repeatCount attribute value
2 means an element plays twice (repeating once).
You can use this attribute to repeat a media element or a
time container element, such as a seq or excl
The repeatCount attribute can have the following values.
||Specifies how many times the timeline repeats. Fractions are rounded up to the nearest whole number. For example, 2.1 would be rounded up to 3.|
||Specifies that the element should repeat indefinitely.|
If you want to base playback on duration rather than on the number of repetitions, use the repeatDur attribute instead. Typically, you will use either the repeatDur attribute or the repeatCount attribute, but not both. If both are defined for the same element, the element will repeat for the duration specified in the repeatDur attribute and then repeat for the count specified in the repeatCount attribute.
In the following example, the repeatCount attribute causes the entire playlist, which contains an individual media element and an excl element, to repeat. Although this is not a practical example, it demonstrates how the repeatCount attribute works with elements.
First, the media element named Logo plays twice because
it has a repeatCount attribute value of
the elements in the excl element play through and repeat
because the excl element also has a repeatCount
attribute value of
2. Finally the entire playlist
plays for a second time.
<?wsx version="1.0"?> <smil repeatCount="2"> <media id="Logo" src="Logo.wmv" repeatCount="2"/> <excl repeatCount="2"> <media id="Music1" src="Music1.wmv" begin="0s"/> <media id="Music2" src="Music2.wmv" begin="Music1.end"/> </excl> </smil>
The repeatCount attribute can be specified for the following playlist elements: