Easy Tutorial
❮ Prop Win Outerheight Met Node Replacechild ❯

onplaying Event

Event Object

Example

Execute JavaScript when a video is ready to start playing after a pause:

More examples are included at the bottom of this page.


Definition and Usage

The onplaying event is triggered when a video/audio (audio/video) is paused or ready to resume playing after buffering.


Browser Support

The numbers in the table indicate the first browser version that supports the event.

Event Chrome IE Firefox Safari Opera
onplaying Yes 9.0 Yes Yes Yes

Syntax

In HTML:

In JavaScript:

In JavaScript, using the addEventListener() method:

Note: The addEventListener() method is not supported in Internet Explorer 8 and earlier versions.


Bubbles: No
Cancelable: No
--- ---
Event Type: Event
--- ---
Supported HTML Tags: <audio>, <video>
--- ---

More Examples

Example

Execute JavaScript when an audio is ready to start playing after a pause:


❮ Prop Win Outerheight Met Node Replacechild ❯