How can I make earphones with full inline controls work with VLC/Spotify? 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.)