Input, control and automation

Tuesday, 22 December 2015

Tuesday, 1 December 2015

Stop the Music

06:57 Posted by Roxton , No comments
One of my favourite things about the internet in general and Youtube in particular is how easy they make it to be culturally decadent. For example, yesterday I was able to spend the afternoon doing exceptionally tedious and mundane legacy system work while listening to the 1958 Lisbon Traviata. It was like using the Bayeux Tapestry as a bedspread.

However, into each life some rain must fall, and from time to time colleagues do actually want to talk to me, which means that I must choose between being extremely rude and making them wait while I try to find which tab out of the hundred or so I have open is playing, or losing my place in the opera - neither of which is ideal.

So here's a little Chrome extension that, when pressed, pauses all Youtube videos in all tabs. When pressed again, it resumes the video in the most recently-opened tab. If you want to add a keyboard shortcut, right-click the icon and select "Set keyboard shortcut". Set the shortcut to "Global" if you want it to work outside Chrome.

As my-first-Chrome-extensions go this is fairly straightforward; if you want to extend it to include other music/video players or to handle pause/resume in a more sophisticated manner, I've made the source code available on Github.