onPlay( )
Adds an event handler that runs when playback is started or restarted.
An audio track can be played by a user clicking the audio player's
play button or by calling its play()
function.
Method Declaration
Copy
Method Parameters
handlerfunctionRequired
handler(): void The name of the function or the function expression to run when the audio track is played.
Returns
Return Type:AudioPlayer
Was this helpful?
Yes
No