YouTip LogoYouTip

Event Onratechange

## HTML DOM onratechange Event The `onratechange` event occurs when the playback speed (playback rate) of an audio or video file is changed. This event is triggered by changes to the `playbackRate` property of the Audio/Video object, which is used to set or return the current playback speed of the media (e.g., playing a video in slow motion, fast forward, or at normal speed). --- ## Syntax You can register this event in three ways: ### 1. In HTML ```html ``` ### 2. In JavaScript (DOM Property) ```javascript object.onratechange = function() { // Your custom script here }; ``` ### 3. In JavaScript (Event Listener) ```javascript object.addEventListener("ratechange", myScript); ``` *Note: The event name is `"ratechange"` when used with `addEventListener()`.* --- ## Technical Details | Feature | Support / Value | | :--- | :--- | | **Bubbles** | No | | **Cancelable** | No | | **Event Type** | `Event` | | **Supported HTML Tags** | `
← Event OnseekedEvent Onprogress β†’