Bug 506209 - plasma-browser-integration takes priority in MPRIS when focusing browser window
Summary: plasma-browser-integration takes priority in MPRIS when focusing browser window
Status: REPORTED
Alias: None
Product: plasma-browser-integration
Classification: Plasma
Component: Firefox (other bugs)
Version First Reported In: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Kai Uwe Broulik
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2025-06-26 11:44 UTC by s+kdeb
Modified: 2025-06-26 11:45 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description s+kdeb 2025-06-26 11:44:35 UTC
SUMMARY
`plasma-browser-integration` takes priority in MPRIS when focusing browser window. Other players behave such that only when an action is performed on a player (such as play/pause) then it takes priority. 
The integration takes priority even without an action, which is a big issue in terms of usability when having a browser and a media player open, because the browser keeps getting focus on random players even though it's the music that is playing that should keep it. I personally notice Reddit video players or previews on Youtube thumbnails taking the focus.


STEPS TO REPRODUCE
1. Open any player in Firefox (with `plasma-browser-integration` installed)
2. Open a separate player in a different process or browser
3. Perform actions on the separate player
4. Click on the Firefox window
5. Run `playerctl -l`

OBSERVED RESULT
```
plasma-browser-integration
chromium.instance383454
firefox.instance_1_54
```
`plasma-browser-integration` jumps to the first spot even though the player was not accessed

EXPECTED RESULT
```
chromium.instance383454
plasma-browser-integration
firefox.instance_1_54
```
`chromium.instance383454` should still be the first one since this one was last accessed

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 6.4.1
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.1
Kernel Version: 6.15.3-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 9950X3D 16-Core Processor
Memory: 64 GiB of RAM (60.4 GiB usable)
Graphics Processor 1: NVIDIA GeForce RTX 4070 Ti SUPER/PCIe/SSE2
Graphics Processor 2: NVIDIA GeForce RTX 4070 Ti SUPER/PCIe/SSE2

ADDITIONAL INFORMATION
Removing `plasma-browser-integration` makes the media player a lot more usable since Firefox exposes its own controls and doesn't have the same issue, but it's not a solution.