Search.../

play( )

Begins or resumes playback.

Description

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

The onPlay( ) event handler is called.

Any event handlers set in the Editor are also called.

Syntax

function play(): Promise<void>

play Parameters

This function does not take any parameters.

Returns

Fulfilled - When the playback begins or resumes.

Return Type:

Promise<void>

Was this helpful?

Begin or resume playback

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

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