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:
When using
play()
on a gallery, make sure the gallery is one where theisPlayable
capability istrue
.If you change a gallery's type to one that doesn't support
play()
, your code may no longer function correctly.
Syntax
function play(): void
play Parameters
This function does not take any parameters.
Returns
This function does not return anything.
Return Type:
void
Was this helpful?
Begins or resumes playback
Copy Code
1$w("#myElement").play();
Toggle an element's current playing state
Copy Code
1if( $w("#myElement").isPlaying ) {2 $w("#myElement").pause();3}4else {5 $w("#myElement").play();6}