A .wsx file is an XML file that defines what you want your playlist to contain and how it should behave. A simple .wsx file below specifies three media files to be played, one after the other.
<?wsx version="1.0"?>
<smil>
<seq id="sq1">
<media id="video1" src="clip1.wmv" />
<media id="video2" src="clip2.wmv" />
<media id="video3" src="clip3.wmv" />
<seq>
</smil>
There are a variety of tags supported by .wsx files enabling greater control over media playback than simply playing one video after the other. For example, you can use the clipBegin and clipEnd tags to serve up a sub-clip of a video.
...
<media id="video1" src="clip1.wmv" clipBegin="15s" clipEnd="30s" />
...
Below is a list of playlist elements and attributes supported by Silverlight.
Note Unsupported attributes might work. They are presently listed as unsupported because they have not been fully tested for Silverlight Beta 2.
Element & Description
|
Supported Attributes
|
Unsupported Attributes
|
|---|
Smil - The root of the playlist.
| id, repeatDur, dur, repeatCount | begin, end, syncEvent |
Switch - Wraps a series of items and allows the server to switch between them if access to one of the items fails.
| id | syncEvent |
Media - Defines an audio or video file in the playlist.
| dur, id, repeatCount, repeatDur, role, src (only streaming video or audio)
| clipBegin, clipEnd, begin, end, syncEvent, mediaName noSkip is always set to true.
You can only point to an audio or video file with the src attribute.
|
Excl - A time container in which only one media element can be played at a time, but the order in which the elements are played is not restricted.
| dur, id, repeatCount, repeatDur | begin, end, endSync, syncEvent |
Seq - A time container that forces media elements within it to play in the order in which they appear within the seq element.
| dur, id, repeatCount, repeatDur | begin, end, endSync, syncEvent |
Once you have created your playlist file, you may have to configure your server to work with playlists - specifically, add the MIME type for .wsx files.