You are not logged in.

#1 2026-02-24 02:23:43

lpv
Member
Registered: 2021-12-23
Posts: 14

Any way to expose one MPRIS player per firefox window?

So I'm on hyprland, and I used AI to write me some scripts to move terminal, nemo & firefox to a special workspace instead of killing them, then restoring them instead of spawning new instances. That makes it faster to "spawn", and in terms of terminal, you don't have to type sudo all the time as it will be the same instance.

However I have that problem with firefox, where if I "hide" a second firefox window, playback will stop on the one playing audio because firefox apparently exposes only one MPRIS player per *profile*, not window. So it's either that or no playback pause when hiding, which is sad.

I looked into PWA's which is really not even close to ideal.

Do you guys know of anything else I could use to tackle this? The title is a bit disorienting, I'm looking for any way to do this. One MPRIS player per window would probably be ideal, but anything that works is welcome.

Edit: Well, after researching more, I think this mission is doomed. Sad day for me, sad day for my linux expectations.

Last edited by lpv (2026-02-24 03:17:44)

Offline

#2 2026-02-24 09:14:54

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,429

Re: Any way to expose one MPRIS player per firefox window?

So I'm on hyprland, and I used AI to write me some scripts to move terminal, nemo & firefox to a special workspace

So you had the AI read https://wiki.hypr.land/Configuring/Unco … workspaces for you?

in terms of terminal, you don't have to type sudo all the time as it will be the same instance.

If you find yourself typing sudo "all the time" there's some other problem with your workflow…
You might also be interested in terminal multiplexers, though, because they allow you to close terminals and attach to the multiplexer again - even from completely different environments.


Now on the main topic:

However I have that problem with firefox, where if I "hide" a second firefox window, playback will stop on the one playing audio because firefox apparently exposes only one MPRIS player per *profile*, not window. So it's either that or no playback pause when hiding, which is sad.

MPRIS is a protocol to allow player control via dbus (generic shortcuts, desktop or toolbar widgets etc et pp)
It has *nothing* to do w/ browsers stopping playback on inactive windows/tabs - that's entirely up to the browser and the the playing webpage.
I don't think I've done anything special and music.youtube.com in firefox keeps playing on inactive tabs or minimized windows (albeit on X11)
The only other thing I could imagine would be some wireplumber config to mute inactive/hidden windows?

Test link:
https://music.youtube.com/watch?v=AfjQ9JGxHNg

Is firefox an Xwayland client?
https://wiki.archlinux.org/title/Waylan … plications

Does it make a difference?
https://wiki.archlinux.org/title/Firefox#Xwayland

Offline

#3 2026-02-24 14:40:00

lpv
Member
Registered: 2021-12-23
Posts: 14

Re: Any way to expose one MPRIS player per firefox window?

seth wrote:

I did not but it seemed to me to know its stuff. I know it's sometimes inconsistent and has old info but still it was very consistent on its answers and my google searches. This link I think doesn't make use of anything that solves my problem.

seth wrote:

If you find yourself typing sudo "all the time" there's some other problem with your workflow…
You might also be interested in terminal multiplexers, though, because they allow you to close terminals and attach to the multiplexer again - even from completely different environments.

Yeah well I'm still new to linux(maybe I should have posted in the Newbie Corner tbh) and was installing a fresh OS install with btrfs snapshots, and rewiring the whole setup the way it was so there was a lot of sudo-ing.

seth wrote:

Now on the main topic:
MPRIS is a protocol to allow player control via dbus (generic shortcuts, desktop or toolbar widgets etc et pp)
It has *nothing* to do w/ browsers stopping playback on inactive windows/tabs - that's entirely up to the browser and the the playing webpage.
I don't think I've done anything special and music.youtube.com in firefox keeps playing on inactive tabs or minimized windows (albeit on X11)

You're right,I think my explanation of the expected usage & problem was not clear enough. Expected usage is: Hide firefox windows(let's stick with browser only for now) and restore, on youtube/spotify/netflix whatever(on MPRIS detection) pause firefox. The problem is: Hiding any other firefox window will pause the MPRIS window because firefox exposes MPRIS per profile and not per window.

seth wrote:

The only other thing I could imagine would be some wireplumber config to mute inactive/hidden windows?

Do you think that could help in that case?

I did not understood those references, sorry. How do I make use of Xwayland in my case?


The only 2 ways I see this going is:

1. Use profiles.
2. Use the broken setup where firefox pauses whenever a second window of it is hidden and expect myself to mostly use 1 firefox instance at a time.
Number 2 is the most likely but I want to explore number 1 as well. Unless there's something else you could suggest as with that wireplumber thing you mentioned.

Thanks for replying btw.

Last edited by lpv (2026-02-24 14:52:49)

Offline

#4 2026-02-24 16:55:38

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,429

Re: Any way to expose one MPRIS player per firefox window?

Hiding any other firefox window will pause the MPRIS window

What "MPRIS window"?
For clarification, do you lose external player access (via shortcuts etc) or does FF flatout stop audio playback?

If it's playback, does FF stop playback on music.youtube.com if you
a) switch to a different tab
b) "minimize" it?

2. Does this happen when starting FF in https://wiki.archlinux.org/title/Firefo … shoot_Mode ?

If not (actual mpris), do you use an mpris extension? Which?

How do I make use of Xwayland in my case?

https://wiki.archlinux.org/title/Waylan … plications explains how to figure whether FF uses xwayland *now*, which currently is the more pressing question.

Offline

#5 2026-02-24 19:27:41

tekstryder
Member
Registered: 2013-02-14
Posts: 504

Re: Any way to expose one MPRIS player per firefox window?

lpv wrote:
seth wrote:

I know it's sometimes inconsistent and has old info...

Sidebar:

If you find any such inconsistency in the Hyprland Wiki please do report it or open a PR to correct:

https://github.com/hyprwm/hyprland-wiki/issues

And remember the wiki is versioned!

Offline

Board footer

Powered by FluxBB