Pausing Spotify while YouTube is playing and starting it when YouTube stops

7

3

Kind of a random request, but something that would be cool nonetheless; would there be anyway I could make Spotify (and possibly iTunes etc.) pause when I start playing a YouTube video, and then start again once the video ends or I pause it?

Is there any software that would allow me to do this? Or a language that would be able to accomplish this?

64bit Windows 7

Sam

Posted 2012-06-26T11:34:32.300

Reputation: 180

What's your OS? – slhck – 2012-06-26T11:50:39.610

Sorry, should have mentioned. 64bit Windows 7 – Sam – 2012-06-26T12:23:56.547

Did you ever solve this issue? – Rob – 2013-06-11T11:14:38.590

No, I did not solve this issue. – Sam – 2013-06-27T11:34:46.043

Answers

3

I built mute.fm (http://www.mutefm.com/) to solve this problem. It works with iTunes, Spotify, and many other music players and will mute/pause it for YouTube or any other video or foreground sound.

Jared Sohn

Posted 2012-06-26T11:34:32.300

Reputation: 188

link broken @Jared_Sohn – Awesome_girl – 2018-04-13T21:13:59.517

link updated @Awesome_girl – Jared Sohn – 2018-04-14T01:31:38.957

1

Haven't tested it, but I think it's doable.

First, add this wrapper to your spotify: https://github.com/johanlindquist/jahspotify. This will give you a REST interface to control playback.

Now, create a chrome (I assume that's what you're using. If not, there are probably similar options for other browsers as well) extension that works for everything on YouTube's domain and add this: https://stackoverflow.com/q/8152814/1456578. Change the code to pause/resume spotify when a certain event happens on YT player.

As I'm intrested in a solution myself as well, I'll probably try it out sometime soon and will then update this answer with the results. Will most likely create/use a lightweight node server to wrap Spotify instead, because Tomcat seems like an overkill and all you (I) actually need is the play/pause functionality.

Deiwin

Posted 2012-06-26T11:34:32.300

Reputation: 111