How to change video playback speed in HTML5?

How to change video playback speed in HTML5? I checked the attributes of the video tags in w3school, but could not approach this. Any help would be appreciated!

+84
performance javascript html5 html5-video video
Jun 12 '10 at 6:11
source share
3 answers

According to this site , it is supported in playbackRate and defaultPlaybackRate attributes, accessible through the DOM. Example:

 /* play video twice as fast */ document.querySelector('video').defaultPlaybackRate = 2.0; document.querySelector('video').play(); /* now play three times as fast just for the heck of it */ document.querySelector('video').playbackRate = 3.0; 

The above works on Chrome 43+, Firefox 20+, IE 9+, Edge 12+.

+141
Jun 12 '10 at 8:05
source share

Just enter

 document.querySelector('video').playbackRate = 1.25; 

in the JS console of your modern browser.

+29
Sep 30 '16 at 15:56
source share
 javascript:document.getElementsByClassName("video-stream html5-main-video")[0].playbackRate = 0.1; 

You can specify any number here, just do not go far so as not to overload the computer.

-one
Mar 25 '19 at 15:17
source share



All Articles