Support Chrome & Firefox's MPRIS2 interfaces
paravoid opened this issue · 4 comments
Chrome and Chromium nowadays support MPRIS2 nowadays.
$ playerctl -l
chrome.instance26232
chromium.instance575
Firefox also reportedly added support for MPRIS2 since version 75 (may need setting media.hardwaremediakeys.enabled
in about:config).
mate-settings-daemon's MPRIS2 plugin seems to hardcode a list of MPRIS2 interfaces (players). Note that Chrome's interface adds a suffix of ".instance" at the end, so this would need to be a bit more dynamic than it is now.
Ideally this would be even more dynamic/less hardcoded to avoid having to hardcode players into MATE. #300 is also relevant here, which requests support for the Lollypop player.
Expected behaviour
Playing hardware "play" or "pause" buttons pauses or plays videos on popular websites like YouTube.
Actual behaviour
Nothing happens.
Steps to reproduce the behaviour
- Fire up Chrome,
- Go to youtube.com, pick a random video
- Press the "pause" button on your keyboard
MATE general version
1.20 currently, but looking at the source git master seems still affected.
mate-settings-daemon's MPRIS2 plugin seems to hardcode a list of MPRIS2 interfaces (players). Note that Chrome's interface adds a suffix of ".instance" at the end, so this would need to be a bit more dynamic than it is now.
I don't know the code, but peeking at it suggests that VLC is doing something similar, but the name watch works because the different instances are on the same base bus (or so, I'm not very DBus-literate). Anyway, what I'm trying to suggest is that dynamic suffixes might not be a problem at all.
Mozilla FF does not provide any MPRIS2 interface yet.
Mozilla FF does not provide any MPRIS2 interface yet.
I haven't tested it myself but https://hg.mozilla.org/mozilla-central/rev/e7e12a4881b8 seems to be the relevant commit and https://bugzilla.mozilla.org/show_bug.cgi?id=1353652 the relevant BMO bug. Reports on the web suggest that it's behind a feature flag, media.hardwaremediakeys.enabled
in about:config.