Using Playlists
The Windows Media Player control provides support for processing playlists. Playlists consist of one or more entries in a Windows Media metafile specifying the location of individual media presentations. The presentation entries are called clips. The Windows Media Player processes each clip in the playlist in sequence. The entire playlist of clips is referred to as a show.
The Windows Media Player control supports the following methods for accessing clips in a playlist:
- The Next method skips to the next clip in the show.
- The Previous method skips back to the previous clip in the show.
One feature of Windows Media Player is its ability to play a preview of each clip in a show. The Windows Media Player control exposes the following properties for previewing clips in a playlist.
- The PreviewMode property specifies whether Windows Media Player is currently in preview mode.
- The CanPreview property specifies whether Windows Media Player can be in preview mode. This property must be true before PreviewMode can be set to true.
Including one or more PREVIEWDURATION elements in the Windows Media metafile specifies the length of time each clip is previewed. Otherwise, the default preview time is 10 seconds.
When position controls are on the control bar, they include a preview button, which toggles preview mode. To display the control bar with position controls, set the ShowControls and ShowPositionControls properties to true.
You can also use Windows Media metafiles to add watermarks and banners to player applications and Web sites. Metafiles also support seamless stream switching for inserting advertisements. For more information about metafiles, see the Windows Media Player SDK version 7 or later.