Search.../

stop( )

Pauses playback.

Description

The stop() function stops the current playback, moves to the beginning of the video, and fires a pause event.

The pause event handlers set on the video player by the onPause( ) function or in the Editor are called.

Note: The stop() function does not work when a video player is presenting a video from Dailymotion, Facebook, or Twitch.

Syntax

function stop(): Promise<void>

stop Parameters

This function does not take any parameters.

Returns

Fulfilled - When playback has been stopped.

Return Type:

Promise<void>

Was this helpful?

Stop playback

Copy Code
1$w("#myVideoPlayer").stop();
Stop playback and log a message when done

Copy Code
1$w("#myVideoPlayer").stop()
2 .then( () => {
3 console.log("Done with stop");
4 } );