次の方法で共有


Adding a 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.]

You can use playlists to choose from collections of your audio and video.

Using the artwork from your first skin, you can make a few changes to the skin definition file.

The first step is to use the shell you will use for most skins:

<THEME>
    <VIEW
        clippingColor = "#CCCC00"
        backgroundImage = "background.bmp"
        titleBar = "false">

        <BUTTONGROUP
            mappingImage = "map.bmp"
            hoverImage = "hover.bmp"> 
                
    </VIEW>


</THEME>

Now add a second VIEW, which contains a playlist. Place the following code after the of the shell code.

     <VIEW 
          id = "playview">
          <PLAYLIST/>
     </VIEW>

You will need to give this second view an ID so you can refer to it later. Add a PLAYELEMENT and a STOPELEMENT. These predefined buttons make life easier.

        <PLAYELEMENT
            mappingColor = "#00FF00" />
                          
        <STOPELEMENT
            mappingColor = "#FF0000" />

Finally, add an onClick event to the PLAYELEMENT to display a playlist in the second view:

            onClick = "JScript: theme.openView('playview');" />

You can see a similar working playlist skin in the sample section of the SDK.

Skin Creation Guide