The keybindings can be set in the Keyboard settings window, under Shortcuts->Custom Shortcuts:
Media keys workaround for spotify (v > 1.0.89)
After that, click on the key-combination column and press the desired media key on the keyboard. Entering each shortcut will disable existing shortcuts with the same key (namely under "Sound and Media")
Worked for me. I only use the media keys with Spotify so this solution is perfect. Tanks a lot!
The workaround of @gumbeto works nicely, but i wanted to make it a bit more easy to type so i created a small application which does the same. You can replace the long dbus-send commands with a shorter line.
You can use
As the commands.
Just place the mpris-control application somewhere it can be execute, like your ~/bin folder or something.