Share via


repeatDur

banner art

Previous Next

repeatDur

The repeatDur attribute specifies the total duration of a repeated element.

Syntax

  repeatDur = Clock-value | "indefinite"
  Clock-value ::= (Full-clock-value | Partial-clock-value | Timecount-value)
  Full-clock-value ::= Hours ":" Minutes ":" Seconds ("." Fraction)?
  Partial-clock-value ::= Minutes ":" Seconds ("." Fraction)?
  Timecount-value ::= Timecount ("." Fraction)? (Metric)?
  Metric ::= "h" | "min" | "s" |"ms"
  Hours ::= DIGIT
  Minutes ::= 2DIGIT; any range from 00 to 59
  Seconds ::= 2DIGIT: range from 00 to 59
  Fraction ::= DIGIT+
  Timecount ::= DIGIT+
  2DIGIT ::= DIGIT DIGIT
  DIGIT ::= (0-9)

Remarks

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

The attribute must be one of the following values.

Value Description
Clock-value Total duration that the element is repeated. For more information about specifying clock values, see Attribute Time Formats.
indefinite The element repeats indefinitely subject to the constraints of the parent time container.

You can assign the repeatDur attribute to either a time container or a media element. Fractional values are valid.

Example Code

In the following example, Audio_1.wma will repeat three times for a total duration of 9 seconds. This is equivalent to a repeatCount of 3.

<?wsx version="1.0"?>
<smil>
    <media src="c:\wmpub\wmroot\Audio_1.wma" dur="3s" repeatDur="9s" />
</smil>

In the next example, assume that the simple duration of Audio_2.wma is 4 seconds and that it is repeated for a total duration of 10 seconds. This is equivalent to a repeatCount of 2.5. However, fractional repeatCount values are not supported.

<?wsx version="1.0"?>
<smil>
    <media src="c:\wmpub\wmroot\Audio_2.wma" repeatDur="10s" />
</smil>

In the next example, assume that Clip_1.wmv is 10 seconds long and that it is repeated for a total duration of 15.5 seconds. That is, the second time it is played, Clip_1.wmv stops before playing its full simple duration.

<?wsx version="1.0"?>
<smil>
    <media src="c:\wmpub\wmroot\Clip_1.wma" repeatDur="15.5s" />
</smil>

You can also use the repeatDur attribute to repeat an entire time container. In the following example, the playlist is repeated three times and the total duration is 180 seconds. This is equivalent to a repeatCount of 3.

<?wsx version="1.0"?>
<smil repeatDur="180s">
    <media src=" c:\wmpub\wmroot\Audio_1.wma " dur="10s" />
    <media src=" c:\wmpub\wmroot\Audio_2.wma " dur="20s" />
    <media src=" c:\wmpub\wmroot\Audio_3.wma " dur="30s" />
</smil>

See Also

Previous Next