VideoJS / Udemy play videos or movies at custom speed or faster using attribute playbackRate

Walter-Tscharf-Development
2 min readMay 11, 2022

The article here is for everyone, who wants to speed up the video.js player. That means if we want to place the video faster than usual. Here a normal value is 100% equal to 1.

Let directly dive in.

For just playing one video of the playlist at a faster speed using the following Js code. Here we are setting the speed to 400% faster.

document.querySelector(".vjs-tech").playbackRate = 4

1. Open the Udemy video course page:

2. Open the Developer tools and here the JavaScript Console.

3. Execute the following code.

Now the video should be played 4x faster than before. Check it in the video player.

Adjustments:

If you want to apply the faster playtime to all videos you could Rapp the command in a timer and refresh it each time a new video is loaded. Therefore use the following:

setInterval(function(){ 
document.querySelector(".vjs-tech").playbackRate = 4
}, 5000);

The code would then be executed every 5 seconds and therefore be also executed when a new video is loaded.

I hope you liked the article. Happy coding!

--

--