Add MPRIS Interface
Overview
This PR implements the MPRIS (Media Player Remote Interfacing Specification) DBus interface for RadioTray-NG. While core playback functionality such as Play and Pause was already supported, this addition integrates these controls with the MPRIS standard, enabling interaction via external tools and media controllers.
Key Features
-
MPRIS Interface Implementation
-
org.mpris.MediaPlayer2andorg.mpris.MediaPlayer2.Playerinterfaces are now available. - Allows external media controllers to interact with RadioTray-NG through the MPRIS interface for actions such as Play, Pause, Stop, Next, and Previous.
-
-
Event Integration
- Integrates with RadioTray-NG's event bus for updating metadata, play state, and volume
-
Testing
- Verified functionality using mpristester(https://github.com/randomguy3/mpristester).
- Ensures compatibility with standard media controllers.
Known Issues
- The
DesktopEntryproperty currently reports an incorrect value, which may affect desktop environment integrations. - Mpristester warns property 'Position' to be incorrect since this implementation always outputs position of 0
- Arturl is not implemented
Next Steps
- Implement media key support into MPRIS support i.e. have option for
nextto control increase volume - Add a config for MPRIS support
- Implement tracklist interface of MPRIS
Since this PR is incomplete, I cannot consider it for merging at this time. Here's a different take on adding this functionality that seems to work quite well.
https://github.com/IngoMeyer441/radiotray-ng-mpris
Thank you for the feedback and for sharing the alternative implementation. I’ve reviewed it and appreciate its approach, but I’d like to implement this functionality natively within the existing radiotray-ng codebase.
I’m currently addressing the known issues and focusing on refining the design for better integration. If there’s anything specific you’d like me to prioritize or further improve, please let me know. I’ll update the PR once I’ve made progress.
Thanks again for your guidance!