Easy Tutorial
❮ Att Form Name Canvas Putimagedata ❯

HTML Audio/Video DOM play Event

HTML Audio/Video DOM Reference Manual

Example

Display a message when the video starts playing:

More examples are included at the bottom of this page.


Definition and Usage

The play event is triggered when the audio/video starts playing.

Tip: The pause event is triggered when the audio/video is paused.


Browser Support

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

Event
play Yes 9.0 Yes Yes Yes

Syntax

In HTML:

In JavaScript:

In JavaScript, using the addEventListener() method:

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


Supported HTML Tags: <audio> and <video>
Supported JavaScript Objects: Audio, Video
--- ---

More Examples

Example

Display a message when the audio starts playing:


❮ Att Form Name Canvas Putimagedata ❯