Search.../

play( )

Begins or resumes playback.

Description

The play() function plays a slideshow or playable gallery and fires a play event.

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

Notes:

Syntax

function play(): void

play Parameters

This function does not take any parameters.

Returns

This function does not return anything.

Return Type:

void

Related Content:

Was this helpful?

Begins or resumes playback

Code Example

Copy Code
1$w("#myElement").play();
Toggle an element's current playing state

Code Example

Copy Code
1if( $w("#myElement").isPlaying ) {
2 $w("#myElement").pause();
3}
4else {
5 $w("#myElement").play();
6}