Easy Tutorial
❮ Jsref Sqrt1 2 Jsref Tolocaletimestring ❯

onratechange Event

Event Object

Example

Execute JavaScript when the playback rate of a video changes:


Definition and Usage

The onratechange event is triggered when the playback rate of an audio/video changes.

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


Browser Support

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

Event
onratechange 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>
--- ---
❮ Jsref Sqrt1 2 Jsref Tolocaletimestring ❯