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

[Feature Request]Add MPRIS support for global/generic media control #3

Open
sakeoftest opened this issue Dec 25, 2019 · 9 comments
Open

Comments

@sakeoftest
Copy link

With a result like spotifyd did.
I'm not familiar with GStreamer, is there any easy way like plugins to introduce?

@betta-cyber
Copy link
Owner

mpv has many mpris support plugins.
but i change mpv and vlc to GStreamer as player beacuse of the libmpv it's diffcult to compile on macOS.
finally i choose the GStreamer.
I will change GStreamer and make it more generic for Linux/mac system. and also will support MPRIS D-Bus Interface

@betta-cyber
Copy link
Owner

Add dbus mpris support as features
You can use this feature by cargo run --features dbus_mpris

@sakeoftest
Copy link
Author

Apparently mpris can be very different implementation on macOS and linux. Like Spotifyd/spotifyd#316

Spotifyd implements the [MPRIS D-Bus Interface Specification][mpris-specification], meaning that it can be controlled by generic media playback controllers such as [playerctl][playerctl-homepage] as well as some tools specifically designed for use with the official Spotify client such as [sp][sp-homepage].

While the dbus-send command works, the current code doesn't really register on both KDE and playerctl.

I hope this issue be kept open and maybe I can send some patches soon

@betta-cyber betta-cyber reopened this Jan 6, 2020
@betta-cyber
Copy link
Owner

I think i need add media player2 interface. I only add a media player2 player interface. I will try it later. thank for your suggestion. I'm looking forward to your PR.

@sakeoftest
Copy link
Author

看了一些隔壁,是直接加了一个mpris_player的依赖,好像也挺好的....

@betta-cyber
Copy link
Owner

betta-cyber commented Jan 7, 2020

看了一些隔壁,是直接加了一个mpris_player的依赖,好像也挺好的....

I've been busy lately. And i add media player2 interface. You can find in my recent commit, It works. but still have some bugs to fix
screenshot

@slikie
Copy link
Contributor

slikie commented Apr 5, 2020

thread '' panicked at 'called Result::unwrap() on an Err value: D-BUs error: Failed to read/write data, disconnected from D-Bus? (org.freedesktop.DBus.Error.Failed)', src/dbus_mpris.rs:49:17

@betta-cyber
Copy link
Owner

brew install dbus or install dbus on your system? can you comfirm your D-BUS service start or stop?

@slikie
Copy link
Contributor

slikie commented Apr 5, 2020

Sorry, that might have been a problem from my end.

Still, I got a few issues unresolved. I understand you may primary use macOS so it may seems trivial. Also I may have suggested the wrong project as example.

The same problem as Spotifyd/spotifyd#457 , properties doesn't actually get updated externally. So clients that connecting will not receive new information.

An easy example to reproduce bug: playerctl metadata -F

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

No branches or pull requests

3 participants