I have a set of earphones with full inline controls (mic, play/pause, vol up/down) but they only seem to work with iTunes (and I'm not sure the mic works at all).
How can I make them work with VLC/Spotify?
I just wrote a simple Mac app to solve this problem. Give it a try.
(Tested on Mac OS X EI and Sierra. Not working for 10.12.4.)
It's an old question, but I've founded a partial solution to remove the automatic launch of iTunes: http://www.thebitguru.com/projects/iTunesPatch
More info and source code here: https://github.com/thebitguru/play-button-itunes-patch
It's better than nothing
There is a small app that remaps bluetooth headset controls to media keys (those on the keyboard). Fixes this bug on Yosemite with Spotify, VLC, Amazon Cloud Player.
Don't how it went, but some have played around with the earphones driver on mac, to try to make it work with Spotify: