HTML onplay Attribute: The HTML onplay attribute is defined as a script to be run when the audio/video has been started or is no longer paused. The onplay attribute is Event Attributes. And the onpause attribute is used to define a script when the audio/video has been paused.
HTML onplay Attribute
The HTML onplay attribute can be applied to the <audio> and <video> elements.
Syntax: <element onplay=”myScript”>
Browser Support:
The HTML onplay attribute is supported by the following browsers:
- Chrome
- Firefox
- Safari
- Opera
- Internet Explorer-9.0