PLAYER Element

[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 PLAYER element lets you define event handlers and specify the URL property of the Player object at design time within a skin definition file. Within script code, the Player object is accessed through the player global attribute rather than through a name specified by an id attribute, which is not supported by the PLAYER element.

The PLAYER element supports the following attribute.

Attribute Description
URL Specifies or retrieves the name of the file to play.

 

The PLAYER element can implement event handlers for the following events fired from the Player object.

Event Description
AudioLanguageChange Occurs when the current audio language changes.
Buffering Occurs when Windows Media Player begins or ends buffering.
CdromMediaChange Occurs when the CD media changes.
CurrentItemChange Occurs when the current item changes.
CurrentMediaItemAvailable Occurs when the current media item becomes available.
CurrentPlaylistChange Occurs when the current playlist changes.
CurrentPlaylistItemAvailable Occurs when the current playlist item becomes available.
DomainChange Occurs when the DVD domain changes.
Error Occurs when the Windows Media Player control has an error condition.
MarkerHit Occurs when Windows Media Player encounters a marker in the clip.
MediaChange Occurs when a media item changes.
MediaCollectionAttributeStringAdded Occurs when an attribute value is added to the library.
MediaCollectionAttributeStringChanged Occurs when an attribute value in the library is changed.
MediaCollectionAttributeStringRemoved Occurs when an attribute value is removed from the library.
MediaCollectionChange Occurs when the MediaCollection object changes.
MediaError Occurs when the Media object has an error condition.
ModeChange Occurs when switching between shuffle and normal mode.
OpenPlaylistSwitch Occurs when a title on a DVD begins playing.
OpenStateChange Occurs when player.openState changes.
PlaylistChange Occurs when a playlist changes.
PlaylistCollectionChange Occurs when something changes in the playlist collection.
PlaylistCollectionPlaylistAdded Occurs when a playlist is added to the playlist collection.
PlaylistCollectionPlaylistRemoved Occurs when a playlist is removed from the playlist collection.
PlayStateChange Occurs when player.playState changes.
PositionChange Occurs when player.controls.currentPosition changes.
ScriptCommand Occurs when Windows Media Player encounters a script command embedded in a file.
StatusChange Occurs when the status property changes value.

 

Player Object

Skin Programming Reference