Use the addEventListener() method to attach a "ratechange" event to a video element.
Use the playbackRate property to change the speed of the video: