Windows Media Player 11 SDK Accessing Media
Previous | Next |
Accessing Media
Use playlists to specify and to control the streaming media or media files that Windows Media Player plays.
Use the ENTRY element to specify a single media element (a media file or a live stream) and any child elements (such as images, MOREINFO links, and ABSTRACT text). Use an ENTRYREF element to specify a playlist. A playlist can contain one or more ENTRY or ENTRYREF elements. Windows Media Player executes a playlist by starting with the first entry and then playing each entry in turn until the list is finished.
An ENTRY element can point to any type of media that Windows Media Player can play. This includes not only .wma, .wmv, .asf, and .avi files, to name a few, but live streams as well. By using a series of ENTRY or ENTRYREF elements to reference media content, you can use a playlist to send a single stream that consists of multiple sources. The referenced streams will play sequentially and be seen as one continuous stream by the viewer. For example, the playlist can contain two ENTRY elements: a standard introduction from a Windows Media file with a .wma extension, and a live Windows Media stream.
Note A playlist must not contain links to media files that have content created with different versions of Digital Rights Management (DRM). In a metafile playlist, if there are links for media files with DRM version 1 content and for media files created with later DRM versions, Windows Media Player will only play the DRM version 1 content.
Controlling Playback
Use playlists to control not only which media clip is played, but also which portions of the clip are played and how. You can use playlists to define a set of clips to be looped or repeated, to set the duration of play, and to assign start times, and start and end markers for each entry. The STARTTIME, STARTMARKER, and ENDMARKER elements work in conjunction with markers in the media file.
For example, the following playlist uses an ad banner and the associated MOREINFO link in one ENTRY, and references a STARTMARKER and ENDMARKER.
Setting Duration
Use the DURATION element to specify how long to play a clip or set of clips. You can also use the PREVIEWMODE attribute of the ASX element in conjunction with the PREVIEWDURATION element to specify how long to play a clip or set of clips. Set the PREVIEWMODE attribute to YES to use the PREVIEWDURATION element to specify how long to play the associated clip. The PREVIEWDURATION and DURATION elements have the same behavior.
See Also
- Metafile Playlists
- Using Metafile Playlists
- Windows Media Metafile Elements Reference
- Windows Media Metafile Guide
Previous | Next |