次の方法で共有


Choosing Files

[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.]

If you want to choose a file, you can use code similar to the Playlist example, but substitute the following for the PLAYELEMENT section:

<PLAYELEMENT
  mappingColor = "#00FF00"
  onClick = "JScript:player.URL=theme.openDialog('FILE_OPEN','FILES_ALL');"
  />

This line will use the openDialog method of THEME to define a URL for the player. You can use this to choose files that are not in playlists.

You can see a similar working openDialog example in the sample section of the SDK.

Skin Creation Guide