![]() |
Previous | Next |
The playState property retrieves a value indicating the state of the Windows Media Player operation.
Syntax
player.playState
Possible Values
This property is a read-only Number (long).
Value | State | Description |
0 | Undefined | Windows Media Player is in an undefined state. |
1 | Stopped | Playback of the current media clip is stopped. |
2 | Paused | Playback of the current media clip is paused. When media is paused, resuming playback begins from the same location. |
3 | Playing | The current media clip is playing. |
4 | ScanForward | The current media clip is fast forwarding. |
5 | ScanReverse | The current media clip is fast rewinding. |
6 | Buffering | The current media clip is getting additional data from the server. |
7 | Waiting | Connection is established, however the server is not sending bits. Waiting for session to begin. |
8 | MediaEnded | Media has completed playback and is at its end. |
9 | Transitioning | Preparing new media. |
10 | Ready | Ready to begin playing. |
Example Code
The following JScript code shows the use of the player.playState property. An HTML text element, named "myText", displays the current status. The player object was created with ID = "Player".
// Test if Windows Media Player is in the playing state.
if (3 == Player.playState)
myText.value = "Windows Media Player is playing!";
else
myText.value = "Windows Media Player is NOT playing!";
See Also
Previous | Next |