If I watch a YouTube video on a YouTube website using an HTML5 player, what JavaScript code can I use to get the video playback speed and change it to another parameter?
In particular, I need this code for the Greasemonkey script I'm working on, so the JavaScript code will be executed in the user's browser.
I know I can do the following:
document.getElementsByClassName('html5-main-video')[0].playbackRate = 2.0
And this will double the playback speed, but it will not change the drop-down box for the "Speed" field of the YouTube player to "2.0", which I would like to do if possible.
javascript html5 youtube greasemonkey video
Gary
source share