onPlay( )
Adds an event handler that runs when playback is started or restarted.
An element can be played by a user clicking the gallery or slideshow's
play button or by calling its play()
function.
Notes:
-
When using
onPlay()
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
onPlay()
, your code may no longer function correctly.
Method Declaration
Copy
Method Parameters
handlerfunctionRequired
handler(): void The name of the function or the function expression to run when the element is played.
Returns
Return Type:Gallery
Was this helpful?
Yes
No