An Example Radio Station Playlist

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The following example code illustrates how to create a playlist to scan three rock radio stations. The fictitious company Adventure Works Radio brand is on the playlist and on all of the individual streams within the playlist. When you write your code, change all URLs and file names to valid file names that are accessible to your Windows Media Player.

A playlist is created for each of the stations. A fourth playlist scans through the first three. The playlists are created to reference dynamically generated advertisements and have Adventure Works Radio branding.

One of the playlists representing a radio station might look like this.

<ASX version = "3.0">
    <TITLE>Adventure Works Radio</TITLE>
    <MOREINFO href = "" />
    <ENTRY clientSkip = "no" skipIfRef = "yes">
       <REF href = "" />
        <TITLE>MyWRCK Radio</TITLE>
        <ABSTRACT>MyTown's Best Rock 'n Roll</ABSTRACT>
        <COPYRIGHT>2000 RadioNetwork</COPYRIGHT>
        <MOREINFO href = "" />
        <REF href = "" />
        <REF href = "" />

The playlist can then be constructed of references to the individual playlists.

Example Code

<ASX Version = "3.0">
    <TITLE>Adventure Works Radio Top 3 Rock Stations</TITLE>
    <MOREINFO href = ""/>
        <ENTRY ClientSkip = "no">
            <REF HREF = "">
        <DURATION VALUE="00:00:30" />
        <ENTRYREF  HREF = ""/>
        <DURATION VALUE="00:00:30" />
        <ENTRYREF HREF = ">
        <DURATION VALUE="00:00:30" />
        <ENTRYREF HREF = ""/>

This example would play an ad followed by 30 seconds of each of the three stations referenced, one after the other. This cycle will repeat indefinitely because the COUNT attribute of the REPEAT element is not defined.

  • The example companies, organizations, products, people and events depicted herein are fictitious. No association with any real company, organization, product, person or event is intended or should be inferred.

Creating Metafile Playlists

Example Playlists

Metafile Playlists

Windows Media Metafile Elements Reference

Windows Media Metafile Guide