radiotray-ng icon indicating copy to clipboard operation
radiotray-ng copied to clipboard

Add MPRIS Interface

Open gotocoto opened this issue 1 year ago • 2 comments

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

  1. MPRIS Interface Implementation

    • org.mpris.MediaPlayer2 and org.mpris.MediaPlayer2.Player interfaces 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.
  2. Event Integration

    • Integrates with RadioTray-NG's event bus for updating metadata, play state, and volume
  3. Testing

    • Verified functionality using mpristester(https://github.com/randomguy3/mpristester).
    • Ensures compatibility with standard media controllers.

Known Issues

  • The DesktopEntry property 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 next to control increase volume
  • Add a config for MPRIS support
  • Implement tracklist interface of MPRIS

gotocoto avatar Dec 06 '24 07:12 gotocoto

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

ebruck avatar Dec 07 '24 02:12 ebruck

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!

gotocoto avatar Dec 17 '24 01:12 gotocoto