← Back to team overview

unity-dev team mailing list archive

Re: [Ayatana-dev] Soundmenu integration

 

Hi Robert,

>>I need some help on integrating with the sound menu (preferably in python). I have successfully registered my app, which implements the MPRIS specification, but I don't know how to handle the button >>presses in the sound menu.

The sound menu button presses uses the the mpris2 protocol to communicate with the player. For instance the play/pause button results in the PlayPause method being called an instance of an org.mpris.MediaPlayer2.Player interface.

You will need to implement an mpris2 compliant server so as you have at a minimum an instance of an MPRIS root and an MPRIS Player dbus object. The root instance is used to determine the capabilities of the server by the client. A complete example implementation of an MPRIS2 server can be found in the banshee source (sudo apt-get source banshee, in the extensions folder you will find a Banshee.Mpris folder with all the relevant code).
I don't know of any Python server implementation. To date Xnoise, MPD, rhythmbox, banshee, amarok are all supported.

>>I think it would be useful if the Sound Menu wiki would contain such information, because there is  info about registering, but nothing else, while the Application Indicators wiki page does contain simple >>samples in C, Python, and C# too.

Good idea, will do this once we have completed the playlist work.

Conor
-- 
Sound Architect
Desktop Experience Team
Product Strategy
Canonical