Linux – Use MPRIS/dbus media commands within Firefox on Linux

dbusfirefoxkeyboardlinux

Back on Windows, I was able to play/pause youtube videos within firefox using the media buttons on my keyboard. On Linux I am really missing this ability.

Is there any way I can send MPRIS commands to Firefox on Linux (gnome)? It doesn't have to work everywhere, youtube alone would be cool enough. I'm using Firefox 56.0.2.


I came across this but the install instructions are only for chrome and I can't get the firefox script to work as I'm not aware of how to create/get an extension/ID from the code on github.

Another answer here suggests the use of hotkeys, this is a nice idea but I would like to control youtube while Firefox is in the background too, so keyboard-shortcuts are out of the question.

All the solutions here are either outdated or for Chrome only.

Best Answer

https://github.com/Aaahh/browser-mpris2-firefox

just for you, you have to run step 1 everytime you open firefox until the addon is published. I'd publish it, but I didn't write the addon I only forked it.

Related Question