Easy Tutorial
❮ Tag Hgroup Tag Tt ❯

HTML Audio/Video DOM ratechange Event

HTML Audio/Video DOM Reference Manual

Example

Change the video playback speed and display the changed speed:


Definition and Usage

The ratechange event is triggered when the playback speed of the audio/video changes (e.g., when the user switches to slow or fast playback mode).

This event is invoked through the playbackRate property of the audio/video, used to set or return the playback speed of the audio/video.


Browser Support

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

Event
ratechange Yes 9.0 Yes Yes Yes

Syntax

In HTML:

In JavaScript:

In JavaScript, using the addEventListener() method:

Note: Internet Explorer 8 and earlier versions do not support the addEventListener() method.


Supported HTML Tags: <audio> and <video>
Supported JavaScript Objects: Audio, Video
--- ---
❮ Tag Hgroup Tag Tt ❯