Controls.stop method

The stop method stops playback of the media item.

Syntax


Controls.stop()

Parameters

This method has no parameters.

Return value

This method does not return a value.

Remarks

This method causes Windows Media Player to release any system resources it is using, such as the audio device. The current media item, however, is not released.

When the player is stopped, the track rewinds to the beginning. Calling play will then begin playback of the clip from the beginning. To halt a play operation without changing the current position, use the pause method.

Examples

The following example creates an HTML BUTTON element that uses stop to stop playback. The Player object was created with ID = "Player".



<INPUT TYPE = "BUTTON"  ID = "STOP"  NAME = "STOP"  VALUE = "Stop"
    onClick = "

        /* Check first to be sure the operation is valid. */
        if (Player.controls.isAvailable('Stop'))

            /* Stop the Player. */
            Player.controls.stop();
">



Requirements

Version

Windows Media Player version 7.0 or later.

DLL

Wmp.dll

See also

Controls Object
Controls.next
Controls.pause
Controls.previous

 

 

Show: