Jump to content

Pause Tabs — Pause audio and video in web browser tabs


Recommended Posts

Run pauseall to pause audio and video in tabs of all open web browers. pauseothers does the same except for the current tab. ⌘↵ makes it pause only tabs from the current browser.

 

akI9PmL.png

 

You need to turn on Allow JavaScript from Apple Events in the browsers you want to control for the Workflow to work.

 

Download | Source

Edited by vitor
Link to comment
  • 3 weeks later...

Apple certainly means to scare you when you enable the option:

JmdbaTG.png

Which is true. And it’s why I don’t provide warnings in the Workflow, since the browsers do it themselves. Activating the option means your browser can be controlled programatically, which is the only way this Workflow can work but it also means it opens the gates to other tools. I never heard of malware which did anything via this route, which isn’t to say it couldn’t be built.

 

Standard care about which tools you tend to run apply.

Link to comment
On 12/25/2021 at 7:57 PM, vitor said:

Update. It now also works on embedded YouTube players. Download the latest version.

Ayy! This workflow finally got made! I'm downloading it right now and we'll see if it works with all of my browser tabs!*

 

- To anyone reading this: for context it was my hundreds of youtube tabs that autoplayed that led to vitor creating this workflow...I eventually gave up and disabled autoplaying on YouTube, though I didn't want to.

 

Vitor, perhaps it's a limitation of Brave Browser, but the script appears to be timing out. I only had one video playing when I tried this each time but I still have all of my tabs. I tried every variation of triggering this workflow with the keywords and it all ended up in the same result. It didn't work for me. Am I doing something wrong?

979145068_PauseTabsNotWorking.png.d498bd3c980efbeab2f23b07eaed7024.pngbut

Link to comment
14 minutes ago, Undertaker01 said:

perhaps it's a limitation of Brave Browser

 

Unlikely. I also used it to test and all Chromium browsers have similar AppleScript.

 

I wonder what different about your setup; you seem to still be the only one to experience that and this has more users now.

Link to comment
25 minutes ago, vitor said:

 

Unlikely. I also used it to test and all Chromium browsers have similar AppleScript.

 

I wonder what different about your setup; you seem to still be the only one to experience that and this has more users now.

 

I do have 400 or so tabs open... lol. If you want I can troubleshoot with you. I'm pretty sure that I'm doing everything right. Should I have you friend me on discord?

Link to comment

I don’t use Discord and it wouldn’t be a good use of our time to diagnose four hundred individual pages when you can do the way simpler and faster solution of trying it with fewer tabs. Timeouts should happen per event, which would mean one or more of the pages could be the problem as they are not letting the necessary JavaScript run or it’s taking too long to finish for another reason. Try this version, which will output to the debugger the URL it’s trying to pause before it does it. It might give a clue.

Link to comment
16 minutes ago, vitor said:

Try this version, which will output to the debugger the URL it’s trying to pause before it does it. It might give a clue.

 

Okay! I'll save this and let you know what it does in a bit.

 

17 minutes ago, vitor said:

trying it with fewer tabs

 

Funnily enough I open about 50 new tabs daily and close about 50 old tabs. I consume a lot of content in order to learn as much as possible in a given amount of time. I've been trying my best, installing reading list extensions, adding bookmarks and watching videos at double speed...

 

I've been working at making Alfred workflows to open groups of URLS and it's on my list to organize my bookmarks so I can put them in folders.

 

Maybe there's an Alfred workflow to help manage this? Having a workflow that connects with a reading list chromium extension would be nice. Or a simpler workflow that allows you to add/remove links from it to act as a reading list within Alfred itself. OR both - I might need more than 1 workflow to have multiple reading lists!

Link to comment
On 12/29/2021 at 5:41 PM, Undertaker01 said:

Maybe there's an Alfred workflow to help manage this? Having a workflow that connects with a reading list chromium extension would be nice.

 

If you use Pinboard (it has a toread list), PinPlus can both add and act on the reading list items.

 

There are a couple Safari Reading List Workflows you can search for as well. I won’t link to them because I don’t know which (still) work. Adding and removing items is easy with those, but removing needs to be done via GUI Safari.

 

Finally, there are Workflows for Pocket and Instapaper.

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...