I want a shortcut that'll allow me to rewind/fw the music by 10 seconds. mediamate does that but idk how.
I tried with a basic shortcut which works on ios but not on macOS
I want a shortcut that'll allow me to rewind/fw the music by 10 seconds. mediamate does that but idk how.
I tried with a basic shortcut which works on ios but not on macOS
I think currently the easiest way is via Apple Script. I might be able to add a dedicated action for rewind/forward, but I'll need to look into that.
tell application "Google Chrome"
repeat with w in windows
repeat with t in tabs of w
if URL of t contains "music.youtube.com" then
execute t javascript "document.querySelector('video').currentTime += 10"
return
end if
end repeat
end repeat
end tell
This version uses whose and is about 10x faster:
tell application "Google Chrome"
repeat with w in windows
repeat with t in (tabs of w whose URL contains "music.youtube.com")
execute t javascript "document.querySelector('video').currentTime += 10"
return
end repeat
end repeat
end tell
nice! didn't know this makes such a big difference ![]()
maybe in another couple decades I'll finally master AppleScript ![]()
If you are willing to have this only work in the active window/tab, you can use the BTT action:
Send Shortcut to Specific App
where the App is whatever browser you use for Youtube, and the shortcuts are:
forwards 10 sec : L
backwards 10 sec : J
(I have this working on a dial on my streamdeck. It's quite effective for quickly moving around in a track.)
thank you all ! this is awesome