Next/Previous + media buttons support

Issue #150 resolved
Saša Stamenković
created an issue

I really like Radio Tray, but there is one feature that stops me from using it.

I listen to radio while I work, and often want to change station, but want to do it with one keypress. I use to do it with media buttons, which are supported by Rhytmbox.

It would be nice to add this feature, also play/stop would be nice to have.

Comments (6)

  1. Ed Bruck

    Play/stop seems to work fine for me. Look at in the src directory which can be assigned to media keys etc. I've used it in the past to create volume up/down on laptops without dedicated keys.

  2. Robert Orzanna

    Hi guys,

    I am looking for media button support as well. I am using radiotray 0.7.3-5 but my media buttons are not supported by default.

    Is there something I need to configure to make them work?

  3. Mark F

    Make sure you turn on the 'Gnome Media Keys' plugin, it's turned off by default and you'll need to restart for it to take effect. I just tested it successfully on Linux Mint Cinnamon 17.1. If you're using MATE desktop then you might need to turn on the Mate 'Media Keys' plugin instead. Although I've read that they may have redirected that to Gnome keys at least in Linux mint.

    Regarding the prev/next station mapping for media keys which was the issue raised by OP, I've just added that functionality to my StationSwitcher plugin. It's working fine for me but I'm going to test it out for a few weeks before submitting a pull request. If anybody wants to try it out let me know.

  4. Robert Orzanna

    Hi Mark,

    Enabled first "Gnome Media Keys" and restarted but it didn't work. Then enabled "Mate Media Keys, restart but didn't work either.

    Enabled both afterwards without success alike.

    I am using Openbox without a DE such as Gnome or Mate installed. Error output when running radiotray from the console:

    ** Message: pygobject_register_sinkfunc is deprecated (GstObject)
    /usr/lib/python2.7/site-packages/radiotray/ FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.
    Sleep Timer, Stops playing after a predefined time,, Carlos Ribeiro
    HelloWorld, This is a test plugin,, Carlos Ribeiro
    Notifications, Shows message notifications on the desktop,, Carlos Ribeiro
    Mate Media Keys, Controls Radio Tray through keyboard multimedia keys,, Ken
    Gnome Media Keys, Controls Radio Tray through keyboard multimedia keys,, Carlos Ribeiro
    History, Shows song history,, Carlos Ribeiro
    Could not bind to Gnome for Media Keys
  5. Mark F

    Hey Robert, I'm not familiar with OpenBox desktop env but I think it's fair to say it isn't really in the gnome family of desktops and hence doesn't use the standard dbus protocol for broadcasting media key events. Hence the last line of your log output "Could not bind to Gnome for Media Keys". I kinda doubt this but if there is another way that OpenBox broadcasts media key events we could write a plug in to make it work.

    Alternatively you can use the solution proposed by Ed Burk above to control radio tray's play/volume functionality through the You can just edit your global hot keys and call that executable with the proper parameters.

  6. Robert Orzanna

    Thanks Mark. I currently don't have the time to do any further testing on this. However, as a side not, media key support for Spotify or VLC works properly on Openbox.

    Would be great if someone else without Gnome (or a major DE) could test compatibility.

  7. Log in to comment