banner art

clipBegin attribute

The clipBegin attribute specifies the point in a media element source at which playback begins. If no clipBegin attribute value is set, playback begins at the beginning of the element. If the value specified is greater than the duration of the media element or is another invalid value, the clipBegin attribute value is ignored. The values of clipBegin attributes are not valid for broadcast sources, and only positive offset values can be used. The value of the clipBegin attribute must be in valid time format. For more information about time formats, see Time formats.

If the clipBegin attribute is used with a video file, the element will actually begin on the nearest key frame prior to the clipBegin attribute value. For example, if a video file has key frames every 5 seconds, and the clipBegin attribute value is 12s, the video will actually begin at 10 seconds. This is done so that the first frame that appears is a complete frame. If a video file were to start playing back on any other frame, the user would see an incomplete picture until the next key frame.

Keep in mind the difference between the clipBegin and begin attributes. The begin attribute specifies a start time value in relation to other elements in a playlist, whereas the clipBegin attribute specifies a start time value in relation to the timeline of the media element itself.

In the following example, the media element Program.wma begins when Bumper1.wma ends and starts playing back at a point that is 35 seconds into the file.

<?wsx version="1.0"?>
<smil>
	<media src="Bumper1.wma"/>
	<media src="Program.wma" clipBegin="00:35"/>
</smil>

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

Note Image Notes

Related topics


© 2005 Microsoft Corporation. All rights reserved.