Play/Pause not working spotify

I run Ubuntu 16.04 dual booted with macOS Mojave on a 2013 macbook pro. Up until a week or so ago, the play/pause/skip keys worked perfectly with Spotify. Now they aren't responsive at all. I recently updated to Mojave on my mac side but I don't know if that's the issue. Restarting does not help. Any suggestions welcome!


Solution 1:

Ok, found the answer. Not sure why is stopped working, but here's how to get it working again. Go into keyboard shortcuts and re-create custom shortcuts:

Play/Pause toggle:

dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause

Previous:

dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous

Next:

dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next