Search...
pause( )
Pauses playback.
Description
The pause()
function pauses a slideshow or playable gallery and fires a pause
event.
The pause
event handlers set on this element by the onPause( )
function or in the Editor are called.
Notes:
When using
pause()
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
pause()
, your code may no longer function correctly.
Syntax
function pause(): void
pause Parameters
This function does not take any parameters.
Returns
This function does not return anything.
Return Type:
void
Mixed in from:$w.PlayableMixin
Related Content:
Was this helpful?
Pauses playback
Copy Code
1$w("#myElement").pause();
Toggle an element's current playing state
Copy Code
1if( $w("#myElement").isPlaying ) {2 $w("#myElement").pause();3}4else {5 $w("#myElement").play();6}