togglePlay( )


Toggles playback.

The togglePlay() function either pauses or plays the current video based on its current state:

  • If the video is paused, it plays and a play event is fired. The play event handlers set on the video player by the onPlay( ) function or in the Editor are called.
  • If the video is playing, it is paused and a pause event is fired. The pause event handlers set on the video player by the onPause( ) function or in the Editor are called.
Method Declaration
Copy
Request
This method does not take any parameters
Did this help?