Electron apps and MPRIS slot

Hey community.

I’m building this music player based on Electron (which is a Chromium browser bundled for desktop apps).
As you can expect from a music player, it uses MPRIS to integrate with the OS, so users can control it.

My code does not know anything about MPRIS: it is using the standard Media Session Web API, which Chromium implements with MPRIS on Linux, and though different mechanism on Windows and OSX.
The whole point of the Media Session API is to be portable.

However, this is problematic when bundling my application with snap, because I can not control my MPRIS slot name: it is hardcoded in Chromium code.

As a result, my snap is being rejected because its MPRIS name isn’t my application name.

Does anybody ever experienced it, and solved it?

Thanks a million for your help.

Hey @Feugy, apologize for the late response and thanks for your explanation.

Even though we strongly prefer this to be in the melodie namespace than chromium as stated in The mpris interface, we have done some research and tests and decided to grant the declaration as you requested (thanks @alexmurray). This is now live.

We still consider the ideal solution is to have the upstream platform making this configurable/customized instead, allowing to have several electron music apps being used at the same time.

Thanks!

Hello @emitorino, and thanks again for this waiver!

Just so you know, I kept pushing this topic on Chromium side, and it’s on the way to be solved!
Thanks to Tommy Steimel, the next version of Chromium will allow setting this MPRIS name.

I need now to push on the Electron side to get the Chromium version updated!

Thanks again.

2 Likes