Share via


dur

banner art

Previous Next

dur

The dur attribute specifies the simple duration of a media element.

Syntax

  dur = 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 dur attribute.

The value of this attribute can be specified as a clock value or "indefinite". For more information about clock values, see Attribute Time Formats. You can use "indefinite" to indicate that the duration is determined after IWMSPlaylist::put_CurrentPlaylistEntry is called.

  • Note   The "media" specifier is not supported.

Example Code

The following example illustrates use of the dur attribute. The Windows Media files are played in the following sequence.

  1. The first element plays for 30 seconds or its actual length, whichever is less.
  2. The second element plays for 30 seconds or its actual length, whichever is less.
  3. The third element plays for its actual length, because a Windows Media server does not recognize negative durations.
  4. The fourth element plays for 15 seconds.
<?wsx version="1.0"?>
<smil>
  <seq>
    <ref src="c:\wmpub\wmroot\Audio_1.wma" dur="+.5min" />
    <ref src="c:\wmpub\wmroot\Audio_2.wma" dur="0.5min" />
    <ref src="c:\wmpub\wmroot\Audio_3.wma" dur="-55" />
    <ref src="c:\wmpub\wmroot\Audio_4.wma" dur="15s" />
  </seq>
</smil>

See Also

Previous Next