Recently I've been listening to music on spotify on my Mac through my Bluetooth headset with no problems but last week spotify stopped responding the the buttons on my headset (play/pause, forward, back) and instead they trigger itunes, even when I am listening to spotify at the time! Does anyone know how I can fix this?
Solved! Go to Solution.
This works incredibly well, thank you.
To be clear, I first needed to apply this patch to prevent iTunes from launching...
Then I ran your application...
Now media buttons on my bluetooth device control Spotify and do not launch iTunes. With just your app, iTunes still launches, so the patch was also necessary.
I also decided to put th app in the Applications directory and have it autolaunch at login.
It's not a perfect solution, but leads me to believe the issue might be with the bluetooth manufacturers. I have a 3rd party keyboard which had the same media key issues everyone is having with their bluetooth devices. When I called the keyboard manufacturer and told them, they had me send the keyboard back and flashed new firmware which sent a different signal code. Now it works perfeclty. I'm guessing the bluetooth devices are also sending an older code and need to be updated.
Running Yosemite 10.10.2 and Spotify 22.214.171.1240.gc75ebdfd
I found that the latest download from https://github.com/jguice/mac-bt-headset-fix worked if I changed the target platform to match 10.10 and then built from source (/build.sh). Yosemite has a new event code for the play pause button and this has been added to this code. I've also posted a pull request for this change from https://github.com/perchten/mac-bt-headset-fix.
BUT, you may also need to fix a bug in spotify which broke scripted control inputs. Instrutions here: https://community.spotify.com/t5/Help-Desktop-Linux-Mac-and/Apple-scripting-broken-in-1-0-1-988-g8f1...control inputs.
Hi, I just tested https://github.com/jguice/mac-bt-headset-fix on El Capitan and it's still working for me.
I did have to make a security exception: https://support.apple.com/kb/PH21769?locale=en_US
Also I put spotify in the foreground initially to test the controls (and quit iTunes which had popped up at some point). After that I was able to use my headset buttons even with a different app in the foreground and iTunes didn't start.
If you have any trouble feel free to create an issue. :)