5

My keyboard has those nice media buttons - play/pause, next, back - that work for local players like Banshee. Is there any way to make them work in Firefox, like for Youtube videos?

anjuta
  • 203
  • 2
  • 9

2 Answers2

5

Here is a list of extensions I found that control various sites from the keyboard

Media Keys 0.5.1

Lets you control Youtube, Pandora, Bandcamp and TidalHiFi website media players using the media keys on your keyboard.

Be Quiet!

Provides tool bar and keyboard media controls and more for several music sites. Adds automatic music pausing functionality when playing html5 videos or watching videos on Youtube.

Google Music Media Key Fix

A fix to enable global use of media keys in Google Play Music.

I would think media keys is what you would need

Mark Kirby
  • 18,289
  • 19
  • 78
  • 113
  • Your first link doesn't work. – A.B. Aug 02 '15 at 10:45
  • Thank you for your answer. Media keys only seem to work when the browser is the active window. I didn't write this in my answer, but I want this to work while I am using a different program in a different work space. – anjuta Aug 05 '15 at 09:28
  • Sounds like that could be a bug in the extension, I would contact the developer https://addons.mozilla.org/en-us/firefox/user/carlin-q/ as these are the only options I could find – Mark Kirby Aug 05 '15 at 09:30
3

Generally no. For a media player to be controllable using the media buttons on your keyboard it has to implement the MPRIS specification which is not something a website can do. Also there is no way for a website to ask the browser to do that for it.

Alternatively an add-on could provide this functionality, but while it is definitely possible to control YouTube playback from an add-on, there does not seem to by any add-on attempts to implement a MPRIS server for YouTube.

If you don't care about YouTube running in the browser you might want to give MPS YouTube a try.

All of this of course only applies to YouTube controlling other video/audio sites would of course require custom solutions for these sites as well.

ntninja
  • 716
  • 3
  • 9
  • Please upvote and mark as accepted answer if this helped you, but do ask for clarification if it did not! – ntninja Aug 02 '15 at 10:19
  • Thank you for the explanation, although it's not what I hoped to hear ;) mps youtube is interesting. I'll give it a try. But it only works with Python 3, so I'll have to find out how to deal with this. – anjuta Aug 05 '15 at 09:29
  • You don't *deal with* it using Python 3. ;-) Python 3 has been part of the default Ubuntu installation for [quite some time now](https://wiki.ubuntu.com/QuantalQuetzal/ReleaseNotes/UbuntuDesktop#QuantalQuetzal.2BAC8-ReleaseNotes.2BAC8-CommonInfrastructure.Python_3.2). Basically installation should be as easy as running `sudo pip3 install mps-youtube` in some terminal window. :-) – ntninja Aug 05 '15 at 21:21