How can I make earphones with full inline controls 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.)