Jump to content

Pause/rewind YouTube while watching tutorials?

Recommended Posts

I'm teaching myself Fusion 360 by watching YouTube videos. I have one screen dedicated to Fusion, the other to YouTube. I'd like to set up hotkeys to pause and rewind YouTube then jump back to the Fusion screen. Often there's multiple steps that I need to watch, then I'll forget a step or something is slightly different/confusing so I need to rewind. Seems like Alfred could be amazingly helpful with this.


Is it possible?


In the YouTube browser window, Space = pause and left arrow key = go back 5 seconds.

Link to comment
2 hours ago, MakeLimeade said:

Is it possible?


Yes, but it's a bit tricky because you'll need to fire simulated keypresses, which is somewhat unreliable.


The simplest way would be to assume your active window is Fusion, and the last active window was your browser’s YouTube window. Then you just need to add a Dispatch Key Combo output that simulates ⌘⇥ to switch windows to your browser, then one to simulate to go back 5 seconds, then another ⌘⇥ to switch back to Fusion.

Very importantly, you need to add a Delay utility between each Key Combo that gives the OS time to perform the action. That might be 0.1 seconds or 0.5 seconds, depending on how fast your Mac is.


If you want something more robust that checks it's firing the simulated keypresses at the right window, you would need to write a somewhat complex AppleScript to do that. How that would look depends entirely on which browser you're using, and if it's Firefox, you can probably forget about getting reliable behaviour because it doesn't support AppleScript.


You might find it works better if you watch the video in MPV, which can play YouTube videos based on their URL, and can do a lot more than just skip forwards/backwards 5 seconds.

Edited by deanishe
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...