Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MPRIS Interface #231

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Add MPRIS Interface #231

wants to merge 7 commits into from

Conversation

gotocoto
Copy link

@gotocoto gotocoto commented Dec 6, 2024

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

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

@ebruck
Copy link
Owner

ebruck commented Dec 7, 2024

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

@gotocoto
Copy link
Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants