Toggles playback.
The togglePlay()
function either pauses or plays the current playback based
on its current state:
play
event is fired. The
play
event handlers set on the audio player by the onPlay( )
function are called.pause
event is fired. The
pause
event handlers set on the audio player by the onPause( )
function are called.