3

In Firefox you can control the playback speed of HTML5 videos by pressing F12 and typing the following in the console:

document.getElementsByTagName("video")[0].playbackRate = 1

Although this method is reasonably general (up to 4x with audio and up to 16x(?) without audio), it is somewhat cumbersome to do manually. It would be nice to have a shortcut and, moreover, a way to set a default value for all playbacks.

There are a couple of Firefox add-ons that seems to solve these issues (i.e. shortcut and default value):

However, according to Wikipedia, there are some security risks associated with add-ons.

Questions

  1. Is it possible to solve the aforementioned issues without add-ons?
  2. Are these add-ons safe?
  • I'm voting to close this question as off-topic because it looks like it is here to promote a particular Firefox extension – Sir Adelaide Jul 13 '18 at 6:31
  • @SirAdelaide It is somewhat weird to promote a particular add-on by emphasizing the security risks associated with it and even asking for other add-on recommendations. – Mark Messa Jul 13 '18 at 7:22
  • sorry, just feeling particularly paranoid today. Particularly as the 'according to Wikipedia' bit raised red flags with me as the risks of running someone else's code should be obvious to pretty much everyone. The reduction in risk due to the code being available for others to test (its linked from the add-on page) is also real (though not foolproof), so the security angle seemed like a cover/diversion. Product recommendation requests are off topic. 5 questions at once makes the question too broad. Taken together these issues are why I voted to close. – Sir Adelaide Jul 13 '18 at 7:37
  • This question is still off topic here, according to the help center: it is not about … websites or web services like Facebook, Twitter, and WordPress. – Nathan.Eilisha Shiraini Jul 13 '18 at 7:50
  • 1
    @Nathan.EilishaShiraini This question isn't about a particular web service, but about Firefox's feature in general – gronostaj Jul 13 '18 at 7:57
5

You can avoid using extensions with bookmarklets. A bookmarklet is a browser bookmark that doesn't actually open a webpage, but executes a piece of Javascript. Bookmarklets use the javascript: pseudoprotocol.

For example create a bookmark with this URL:

javascript:(function(){document.getElementsByTagName("video")[0].playbackRate = 2)();

to set double playback speed. Create more bookmarks with adjusted playbackRate values you frequently use.

This is completely secure, because entire code executed by the browser is under your control.

  • 1
    Couldn't make it work with your code. Shouldn't it be like: javascript:(function(){ document.getElementsByTagName("video")[0].playbackRate=4; })(); – Mark Messa Jul 13 '18 at 19:48
  • @MarkMessa Honestly, I haven't tested it because I don't use Firefox. It's possible that the browser doesn't parse this assignment correctly and it has to be wrapped in parentheses or an IIFE as you did. If you can confirm that your version works, I'll update my answer. – gronostaj Jul 14 '18 at 9:14
  • "it has to be wrapped in parentheses" I tried that before but it didn't worked. – Mark Messa Jul 14 '18 at 15:06
  • 1
    "If you can confirm that your version works, I'll update my answer." Indeed it worked. – Mark Messa Jul 14 '18 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.