다음을 통해 공유


Working with the Player

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

When using Microsoft JScript to access methods and properties of Windows Media Player, you must use the name "player" for the name of the control. For example, to reference the Stop method, you must type:

player.Controls.Stop()

The player global attribute is the key to accessing the Windows Media Player control through skin scripting. Through this attribute, all the objects of the Windows Media Player control become accessible for run-time modification through their properties and methods. Additionally, the PLAYER element is available so that you can specify event handlers and the url attribute at design time.

Using JScript