Search.../

play( )

Begins or resumes playback.

Description

The play() function plays the current video and fires a play event.

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

Syntax

function play(): Promise<void>

play Parameters

This function does not take any parameters.

Returns

Fulfilled - When playback begins or resumes.

Return Type:

Promise<void>

Was this helpful?

Begin or resume playback

Code Example

Copy Code
1$w("#myVideoPlayer").play();
Begin or resume playback and log a message when done

Code Example

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