Windows apps
Collapse the table of content
Expand the table of content


banner art


The clipBegin attribute specifies the time at which a stream begins playing, relative to the start of the media file.


clipBegin ::= (Metric "=" )? (Clock-value)
  Metric ::= "npt"
  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+
  DIGIT ::= (0-9)


The value of this attribute must be specified as a clock value. For more information, see Attribute Time Formats.

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

The difference between this attribute and the begin attribute is that the offset you specify for clipBegin is relative to the start of the file, whereas the offset that you specify for begin is relative to the start of the time container. For example, if you set begin to 0 seconds and clipBegin to 5 seconds, the media element begins playing five seconds after the start of the media file.

If the value you specify for clipBegin is greater than the length of the file, the attribute is ignored, and the Windows Media server will stream from the start of the file. This attribute is also ignored for live streams.

  • Note   You can use a normal play time "npt" specifier in front of the clock value, but it will not affect the attribute. The following are not supported: the "marker" specifier, SMPTE frame values, and negative offsets.

Example Code

The following example illustrates how to use the clipBegin attribute. The Windows Media files play in the same sequence in which they appear in the playlist.

  1. When the seq time container starts, Audio_1.wmv starts playing from a point 42 seconds into the file.
  2. When Audio_1 finishes, Audio_2.wmv starts playing at the beginning of the file.
  3. When Audio_2 finishes, Audio_3.wmv starts playing from a point 2 minutes into the file.
  4. When Audio_3 finishes, Audio_4.wmv starts playing at the beginning of the file and runs for 30 seconds.
<?wsx version="1.0"?>
    <media src="c:\wmpub\wmroot\Audio_1.wma" clipBegin="42" />
    <media src="c:\wmpub\wmroot\Audio_2.wma" clipBegin="0:00" />
    <media src="c:\wmpub\wmroot\Audio_3.wma" clipBegin="2min" />
    <media src="c:\wmpub\wmroot\Audio_4.wma" clipBegin="0h" dur="30" />

See Also

© 2018 Microsoft