HTML onratechange Attribute
Definition and Usage
The onratechange
attribute defines a script to be run when the playing speed of the audio/video is changed (like when a user switches to a slow motion or fast forward mode).
Applies to
The onratechange
attribute is part of the Event Attributes, and can be used on the following elements:
Elements | Event |
---|---|
<audio> | ratechange |
<video> | ratechange |
Examples
Audio Example
Run "myFunction" when the audio changes the rate:
<audio onratechange="myFunction()">
Try it Yourself »
Video Example
Run "myFunction" when the video changes the rate:
<video onratechange="myFunction()">
Try it Yourself »
Browser Support
The onratechange
attribute has the following browser support for each element:
Element | |||||
---|---|---|---|---|---|
audio | Yes | 9.0 | Yes | Yes | Yes |
video | Yes | 9.0 | Yes | Yes | Yes |