GeoHack: Speeding Up Lecture Videos

Tue, Oct 27, 2020 2-minute read

I should be doing work/studying for my exam tomorrow, but I wanted to share a small bit of code that helped me get through a couple weeks of lecture videos a bit faster.1 Most lecture video platforms already have a playback rate option that lets you speed through lecture videos at 2x speed. While that is usually fast enough, sometimes you just need to push it a little bit faster 😝.

Below is a bit of code that lets me change the playback rate of lecture videos on Panopto2.

javascript:
p = flowplayer($(".flowplayer")[0]);
l = document.getElementById("playSpeedMultiplier");

document.addEventListener('keydown', (e) => {
	s = p.currentSpeed;
	if(e.code == "KeyT") {
		s = 1;
	} else if (e.code == "KeyR") {
		s = p.currentSpeed+0.2;
	} else if(e.code=="KeyE" && p.currentSpeed > 0.4) {
		s = p.currentSpeed-0.2;
	}
	if(l !== null) {l.innerHTML = s + "x"};
	p.speed(s);
});

To use it, copy the code and put it in the URL of a bookmark (and name it anything you want). NOTE: Make sure you include the javascript: part when copying. When on the website with the lecture video, click the bookmark to enable it. Once enabled…

  • Pressing E decreases playback rate by x0.2
  • Pressing R increases playback rate by x0.2
  • Pressing T resets playback rate to x1.0

Good luck studying! 3


  1. If you really want to procrastinate/optimize your lecture video watching take a look at this video. ↩︎

  2. Panopto has been MIT’s platform of choice for most lecture videos since everything went remote. Panopto uses the flowplayer javascript package for video playback, so the snippet might be useful for other websites though ymmv. ↩︎

  3. I really need a better name for these posts. Posting here is mostly for personal bookkeeping, but maybe someone else will find it useful 🤔. ↩︎