When I plug in my headphones (for longboarding) set media volume to max, open Spotify, a bit of scripting emmulates touch input that navigates to my playlist and starts the music on shuffle. When headphones are removed the application quits and volume is returned to the previous value.