Skip to content
This repository has been archived by the owner on Sep 28, 2020. It is now read-only.

jsmnbom/mpris-integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Firefox now supports mrpis natively, so this extension is no longer needed, and is not in active development
For more info see: #9

Mpris integration

Adds mpris integration for certain sites using a Firefox Webextension.

It allows you to have proper media key support for webplayers like youtube and spotify.

Sites

The extension currently works with the following sites

  • Spotify (open.spotify.com)
  • Youtube (youtube.com)

Getting started

Prerequisites

The following software is required to use this project.

  • A fairly recent version of firefox (anything above version 64.0 should be fine)
  • glib, dbus (install using your package manager)
  • Something to interact with mpris players (like playerctl or gnome shell)

Installing

  1. Install the webextension
  2. Install the native host
    • Compiled version from here.
    • Or compile it yourself (see below)
  3. Add a native manifest file
    • Copy the mpris_integration_native.json file to ~/.mozilla/native-messaging-hosts/ and replace the path key with the location of the native host binary.

If you're running Arch Linux, steps 2 and 3 can be replaced by installing the AUR package media-integration-native-host (not yet released).

Compiling yourself

Compile prerequisites

In addition to the prerequisites above you will also need

The extension

  1. In the add-on/ directory
    • Run tsc --build to build the source typescript files into javascript, which is placed in the add-on/dist folder.
    • Run the web-ext build command. The build extension will be placed as a .zip in add-on/web-ext-artifacts. To install it, look here.
  2. Run cargo build (optionally with the --release flag to make an optimized build). The binary will be placed in target/{debug,release}.

Don't forget to also add a native manifest file as described in the installation section.

License

This webextension and native host is licensed under the MIT license.

Acknowledgements

Icon made by Freepik from www.flaticon.com is licensed by CC 3.0 BY.