banner art

clipEnd attribute

The clipEnd attribute specifies the end point for a media element. If no clipEnd attribute value is set, playback continues until the natural end of an element. In most cases, the clipEnd and end attributes can be used interchangeably.

If a media element's clipEnd value is less than its clipBegin value, the media element is not played. If the clipEnd value is greater than the duration of an element, the clipEnd attribute value is ignored. If the media element is a playlist file, the clipEnd attribute value is applied to the first media element in the nested playlist. Only positive offset values can be used. The value of the clipEnd attribute must be a valid time format. For information about time formats, see Time formats.

In the following example, the clipEnd attribute is used with the clipBegin attribute to play back a short section of a long lecture video. The media element Intro.wmv plays all to completion, followed by the first segment of LongLecture.wmv. The first segment ends at 01:23 minutes and is followed by the second segment which starts 5:35 minutes into the file. This segment ends at 7:05 minutes and is followed by the last segment, which plays from 12:30 to 15:00.

<?wsx version="1.0"?>
	<media src="Intro.wmv"/>
	<media src="LongLecture.wmv" clipEnd="01:23"/>
	<media src="LongLecture.wmv" clipBegin="05:35" clipEnd="07:05"/>
	<media src="LongLecture.wmv" clipBegin="12:30" clipEnd="15:00"/>

A dur attribute value could be used in this example instead of the clipEnd attribute. For example, the last segment could be defined as having a dur attribute value of 2.30m. An end value could also be used in place of clipEnd.

The clipEnd attribute can be specified for the following playlist element:

Note Image Notes

Related topics

© 2005 Microsoft Corporation. All rights reserved.