How to rewind (F7 command) or fast forward(F9) just like the F8 button plays/pauses a video on a last active video playing browser such as youtube etc?

Hi everyone,


I have a question which I need to find out and make life easier.


Does anyone know how I can activate the fast forward F9 button by say increments of 5 / 10 / 15 seconds or F7 backwards on OS or OSX - how would I configure this whether via the Keyboard shortcut under system preferences or a third party plugin?


Such an example would definitely be while using Youtube. Currently I can Play/Pause a video by pressing F8 when I am watching regardless what window I am in or program etc. say even a web browser or another software/program but how do I simply re-program the F7 and F9 keys for Youtube or for an active Video player so I can go back in increments of 5, 10 or 15 seconds? Is there a third party free or paid version of a plugin?



Thanks so much in advance!


Steve



Posted on Mar 26, 2024 4:55 AM

Reply

Similar questions

19 replies

Apr 5, 2024 10:33 PM in response to BDAqua

I figured it out!


I used Better touch tool!


If anyone wants to know, I happily take donations hehe jks!


This is what I did.


I copied this script code below instead or/ what was provided by BDAqua:




tell application "Google Chrome"

  repeat with t in tabs of windows

    tell t

        execute javascript "

      var player = document.querySelector('video');

      player.currentTime = player.currentTime + 10;

      "

        exit repeat

      end if

    end tell

  end repeat

end tell




But first I created a trigger action in Better touch tool under "Keyboard shortcuts" then pressed f9 for forward hotkey, then created an action for Run applescript in background pasted the code, Run/Compile and saved then lastly tried it out.


For rewind F7 you can replace the + sign for a - , the same code for everything.


For F8 play/pause you don't need to do anything, this already works for Youtube.




I wanted to find out what Applescript would it be for VLC player - could anyone provide a script for this F7, F8 and F9 keys?


Any help would be appreciated!


Thanks so much guys!


[Edited by Moderator]

Apr 5, 2024 12:54 AM in response to BDAqua

I have done this in Keyboard Maestro but I can't get it to activate the current or last activated video in google chrome playing a video I have tried recording feature too but it's the closest I can do to try and get it working.


see screenshot.



I have tried tunring on and off function keys from System preferences under Keyboard and recording the fn key and pressing F9 and playign around but it does work, but it does work but does not work the same way F8 is used to play the current playing video in Youtube. I need to be in the youtube tab in chrome and be watchign the video or tutorial etc. and then it works, but if I navigate away it does not work by pressing the f9 key.



Applescript I have no clue how to do or use with Automnator a little confused with this.


any more help or ideas would be good.


Mar 27, 2024 12:36 AM in response to stoly33

Steve, here's a clue to get you started...

AppleScript to fast forward YouTube videos


tell application "Google Chrome"
    repeat with t in tabs of windows
        tell t
            if URL starts with "http://www.youtube.com/watch" or URL starts with "https://www.youtube.com/watch" then
                execute javascript "
            var player = document.querySelector('video');
            player.seekTo(player.getCurrentPosition() + 10000);
            "
                exit repeat
            end if
        end tell
    end repeat
end tell

https://apple.stackexchange.com/questions/370142/applescript-to-fast-forward-youtube-videos


Pause...


https://stackoverflow.com/questions/67350212/is-there-a-way-to-pause-a-youtube-video-in-google-chrome-using-applescript

How to rewind (F7 command) or fast forward(F9) just like the F8 button plays/pauses a video on a last active video playing browser such as youtube etc?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.