Change Speed Of Edpuzzle Video - Gists · GitHub

Skip to content Search Gists Search Gists All gists Back to GitHub Sign in Sign up Sign in Sign up Dismiss alert {{ message }}

Instantly share code, notes, and snippets.

@SheepTester SheepTester/explainer.md Created May 4, 2020 19:35 Show Gist options
  • Star (25) You must be signed in to star a gist
  • Fork (1) You must be signed in to fork a gist
  • Embed Select an option
    • Embed Embed this gist in your website.
    • Share Copy sharable link for this gist.
    • Clone via HTTPS Clone using the web URL.

    No results found

    Learn more about clone URLs Clone this repository at <script src="https://gist.github.com/SheepTester/a5009c402d58117b167049faa274de52.js"></script>
  • Save SheepTester/a5009c402d58117b167049faa274de52 to your computer and use it in GitHub Desktop.
Code Revisions 1 Stars 24 Forks 1 Embed Select an option
  • Embed Embed this gist in your website.
  • Share Copy sharable link for this gist.
  • Clone via HTTPS Clone using the web URL.

No results found

Learn more about clone URLs Clone this repository at <script src="https://gist.github.com/SheepTester/a5009c402d58117b167049faa274de52.js"></script> Save SheepTester/a5009c402d58117b167049faa274de52 to your computer and use it in GitHub Desktop. Download ZIP Change speed of Edpuzzle video Raw explainer.md

Edpuzzle aggressively reverts the playbackRate of a <video> element, so you can't simply change it to increase the speed. Thus, a more aggressive response is necessary to combat it.

Firstly, we get the <video> element:

video = document.querySelector('video')

Then, we get the setter function for the playbackRate property using Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'playbackRate').set. It is called with the <video> element as this and with speed as the new value. This way, the <video> element is properly notified of the speed change by simulating assigning a value to playBackRate directly (ie using =).

Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'playbackRate').set.call(video, speed)

After that, to prevent Edpuzzle from changing it back, we make playbackRate unwritable, so they can't simply set it:

Object.defineProperty(video, 'playbackRate', { writable: false })

Of course, if we can change the speed this way, so can Edpuzzle, so this might not work in the future.

Raw paste-into-console.js This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters
// Paste the following code in the console (right click > inspect element, then click on the Console tab) on the Edpuzzle page
speed = 2 // Change this to the speed (eg 2 for 2x speed)
video = document.querySelector('video')
Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'playbackRate').set.call(video, speed)
Object.defineProperty(video, 'playbackRate', { writable: false })
@achow0 Copy link

achow0 commented Mar 25, 2021

I'm getting error Uncaught TypeError: Illegal invocation at <anonymous>:3:81. How to fix this?

Uh oh!

There was an error while loading. Please reload this page.

@SheepTester Copy link Author

SheepTester commented Mar 25, 2021

@achow0 That might be because video is null. This might be because the Edpuzzle has a YouTube video, so the <video> element is inside an iframe. You should right click > Inspect element on the YouTube video (you may have to right click a few times to show the browser's right click menu), and then try pasting the code.

Uh oh!

There was an error while loading. Please reload this page.

@achow0 Copy link

achow0 commented Mar 25, 2021

In my case, I didn't find a <video> element, but instead only an <iframe>. Should I replace video = document.querySelector('video') with video = document.querySelector('iframe') or what?

Uh oh!

There was an error while loading. Please reload this page.

@SheepTester Copy link Author

SheepTester commented Mar 25, 2021

image You will have to select the YouTube frame in the dropdown; this is automatically selected if you right click > Inspect element on the YouTube video itself rather than the outer website

Uh oh!

There was an error while loading. Please reload this page.

@achow0 Copy link

achow0 commented Mar 26, 2021 edited Loading

Uh oh!

There was an error while loading. Please reload this page.

image

Thank you, that worked. But edpuzzle is now detecting that I'm skipping ahead, even at a 2x speed(Edit: I got it to work at 2x speed, but anything like 4x speed won't work). This will cause the video to be paused very often, and the final result is that it's actually slower than watching it normally. Is there a way to bypass this problem?

Uh oh!

There was an error while loading. Please reload this page.

@SheepTester Copy link Author

SheepTester commented Mar 26, 2021

Hmm, this video recommends skipping to the end of the video. You can use their method, or use JS; both work:

video = document.querySelector('video') video.currentTime = video.duration

Then you could open the video in a new tab and watch it at whatever speed you please

Uh oh!

There was an error while loading. Please reload this page.

@gosoccerboy5 Copy link

gosoccerboy5 commented Jul 15, 2021

Could they not have just defined a setter for the video named playbackRate that will block any attempts to change the playback rate? Or would that throw some error (or be worked around with something like setAttribute)?

Uh oh!

There was an error while loading. Please reload this page.

@SheepTester Copy link Author

SheepTester commented Jul 15, 2021

Probably; hopefully they don't

Uh oh!

There was an error while loading. Please reload this page.

@Ricksbinder Copy link

Ricksbinder commented Jan 13, 2022

Does anyone have an idea if we can also modify how long it says it took to take the edpuzzle on an admin/teacher account page?

Uh oh!

There was an error while loading. Please reload this page.

@GinjaNinja5197 Copy link

GinjaNinja5197 commented Jan 26, 2022

anyone got a bookmarklet for this

Uh oh!

There was an error while loading. Please reload this page.

@SheepTester Copy link Author

SheepTester commented Jan 26, 2022 edited Loading

Uh oh!

There was an error while loading. Please reload this page.

javascript:(() => { const speed = prompt('Speed', 2), video = document.querySelector('video'); Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'playbackRate').set.call(video, speed); Object.defineProperty(video, 'playbackRate', { writable: false }) })()

Uh oh!

There was an error while loading. Please reload this page.

@anhdq201 Copy link

anhdq201 commented Feb 18, 2022

Can you help me rewind the video?

Uh oh!

There was an error while loading. Please reload this page.

@SheepTester Copy link Author

SheepTester commented Feb 18, 2022

Rewind? Does Edpuzzle block seeking previous parts of the video?

Uh oh!

There was an error while loading. Please reload this page.

@GinjaNinja5197 Copy link

GinjaNinja5197 commented Feb 24, 2022

this dont work no more

Uh oh!

There was an error while loading. Please reload this page.

@SheepTester Copy link Author

SheepTester commented Feb 24, 2022

oh well. it's an arms race

Uh oh!

There was an error while loading. Please reload this page.

@GinjaNinja5197 Copy link

GinjaNinja5197 commented Feb 25, 2022

have you fixed it i have a 40 minute long video to watch

Uh oh!

There was an error while loading. Please reload this page.

@SheepTester Copy link Author

SheepTester commented Feb 25, 2022

lazy

Uh oh!

There was an error while loading. Please reload this page.

@kickturn Copy link

kickturn commented Feb 25, 2022

Use the method to skip to the end, that one just worked for me on a 24 minute video.

Uh oh!

There was an error while loading. Please reload this page.

@GinjaNinja5197 Copy link

GinjaNinja5197 commented Feb 28, 2022

my school blocked inspect element

Uh oh!

There was an error while loading. Please reload this page.

@GinjaNinja5197 Copy link

GinjaNinja5197 commented Mar 7, 2022

you alive @SheepTester

Uh oh!

There was an error while loading. Please reload this page.

@SheepTester Copy link Author

SheepTester commented Mar 7, 2022

that sucks

Uh oh!

There was an error while loading. Please reload this page.

@GinjaNinja5197 Copy link

GinjaNinja5197 commented Mar 11, 2022

have you figured out a fix for it because i know nothing about coding

Uh oh!

There was an error while loading. Please reload this page.

@SheepTester Copy link Author

SheepTester commented Mar 11, 2022

no

Uh oh!

There was an error while loading. Please reload this page.

@GinjaNinja5197 Copy link

GinjaNinja5197 commented Mar 14, 2022

I found a fix using a Inspect element bookmarklet and deleting a lot of stuff around the video which unlocks the video so i just skip through refresh the page and answer the questions.

Uh oh!

There was an error while loading. Please reload this page.

@rsangimino335 Copy link

rsangimino335 commented Sep 22, 2022

can you make it so a can fast forward throught the video

Uh oh!

There was an error while loading. Please reload this page.

@treeesswebsite Copy link

treeesswebsite commented Oct 17, 2022

Yes pls Fix it.

Uh oh!

There was an error while loading. Please reload this page.

@TheJeetSingh Copy link

TheJeetSingh commented Apr 7, 2025

setting speed = 16 is an easy way to finish a video but terrible if your trying to learn. I think thats the highest playback speed supported.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment You can’t perform that action at this time.

Tag » How To Speed Up Edpuzzle