ClientRegistration

Registration process

Each player should use a similar approach used with Ted Gould’s app indicators in order to enable remote control from the sound menu.

This is very straightforward. Here is an example of the mandatory override method of a Rhythmbox plugin in Vala which basically establishes Ayatana registration.

  • public override void activate (RB.Shell shell) {

    • debug("Rhythmbox - Hello Ayatana world\n");

      server = Server.ref_default();

       server.set("type", "music.rhythmbox");

       server.show();

 } 

The advantage of using libindicate is that no matter happens, on client shutdown, the sound service will be notified of the event. Similarly for start up this mechanism provides a clean fool-proof approach for dynamic registration without relying on PulseAudio's client/stream labelling.

Bindings for libindicate exist for Python, Vala and C. Mono bindings will be added very shortly. https://launchpad.net/libindicate

Registration will need to be disabled if a user would prefer for a certain player not to be controllable from the menu. Guidelines as to how this preference is to be represented in the UI of the client (specifically Rhythmbox, Banshee or Amarok) has been included in the spec. We would like to provide a unified music player experience on the Ubuntu platform therefore we strongly urge application developers to follow this spec.

https://wiki.ubuntu.com/SoundMenu

Sound/ClientRegistration (last edited 2013-06-25 15:59:33 by mpt)