Partager via


About the Controls Object

[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 Controls object governs the transport of digital media content through the control by using methods such as Play and Stop. It is accessed only through the Controls property of the Player object. The Controls property returns the Controls object. You can only access the properties of the Controls object after you have created it. For example, to use the Play method, you must use the following code:

player.controls.play();

Controls Object

Player Object Model for Scripting Languages