Even though Spotify shows up in the indicator-sound just fine (Controlling it works from there) using multimedia keys on your keyboard does nothing.
When I open up Rhythmbox they're able to control the music there, so the keyboard settings seem ok.
Try out Spotify Gnome
Spotify-Gnome is a program that provides Gnome media key support for the Spotify Linux client. It supports the play/pause, stop, next, and previous signals, and is compatible with both Gnome 2 and Gnome 3.
Disclaimer: I work for Spotify
This was a known missing feature of the linux client, but we added it in version 0.9.4. So while this thread is rather old, it's worth noting that it should now work. If you continue to experience problems with the media keys, then please post a message on the community forums.
You can use spotify-notify. Not only does it provide notify-osd notifications, but it also has support for media keys.
What distro/desktop environment are you using? I am on XFCE, and there is an issue with the keybinds (I believe XFCE interprets them differently than the other DE's).
I found a GitHub page giving the solution which worked for me on Ubuntu 17.04 with XFCE: https://gist.github.com/jbonney/5743509
Here is the steps (explained in a little more detail than the GitHub page):
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous
This should fix it! This worked for me. You may be able to skip the Stop button, and don't confuse it for the Play/Pause button. I almost did.
Like I said, I think XFCE has some issue with the keys. I think XFCE interprets
XF86AudioPlay because of the
XF at the beginning, and Spotify doesn't recognize it. That would make sense because it works in other DE's without issue, but XFCE breaks it without being set up. Either way, this works for me, so I hope it worked for you!
The mulitmedia keys have nothing to do with the sound indicator. Reactions to those keys have to be implemented in spotify itself. I don't think there is a workaround. After all the spotify linux client is still beta so there is hope that this feature will be added in a foreseeable time :-)