Firefox

Firefox will soon support hardware media controls

Mozilla enabled support for the Media Session API in Firefox 76 Nightly recently. The plan is to introduce the API in stable versions of the Firefox web browser soon.

One of the abilities of the API is to support hardware media keys in the web browser. If that sounds familiar, it may be because Google added support for hardware media keys in the company’s Chrome web browser this year.

Google introduced support for media keys in Chrome 73 Stable for the desktop. The feature enables support for using media keys on the keyboard, e.g. mute, volume up or down, or play/pause, on media sites in the browser.

One of the downsides of the feature is that it may interfere with other services and apps that rely on media keys, e.g. Spotify or iTunes. Chrome users may disable media key support in Chrome to fix the issue currently.

Mozilla enabled the Media Session API in Firefox 71 partially and has now enabled it by default in Firefox 76 Nightly.

Firefox will display an overlay when media keys are used when the feature is enabled. A quick test on several media sites such as YouTube and Twitch was successful. All test sites responded to media keys such as mute or play/pause.

Firefox users may interact with the overlay once it is displayed using mouse or touch input as well.

Windows 10 users may furthermore notice media controls on the operating system’s lockscreen if a video is playing in Firefox.

Nightly is the development version of the Firefox web browser and the Meta bug suggests that work is still ongoing. Nightly users may run into bugs or issues because of that.

If development progresses as planned, Firefox users may soon use hardware media keys to control playback in the browser.

Mozilla added an option to Firefox to disable the feature; this may be useful if Firefox interferes with used media applications just like Chrome does.

Here is what you need to do to disable media key support in Firefox:

  1. Load about:config in the Firefox web browser.
  2. Confirm that you will be careful if the warning message appears.
  3. Search for media.hardwaremediakeys.enabled.
    1. Set the preference to TRUE to enable the feature.
    2. Set the preference to FALSE to disable the feature.

Firefox does come with controls to disable the Media Session API as well:

  • Set the preference dom.media.mediasession.enabled to FALSE to disable it.

Closing Words

Users who spend a lot of time in the browser, especially on media sites, may find the new media support useful if they have a keyboard with multimedia keys. Instead of having to interact with the browser’s UI, e.g. by using mouse or touch, they may then use the media keys to control playback.

You Might Also Like