JasonLG1979 / gnome-shell-extension-mpris-indicator-button

A full featured MPRIS indicator button extension for GNOME Shell 3.38+
https://extensions.gnome.org/extension/1379/mpris-indicator-button/
GNU General Public License v3.0
159 stars 21 forks source link

Exclude Chrome player #42

Closed webmastak closed 4 years ago

webmastak commented 4 years ago

When watching a video on youtube, a player appears, but after closing the tab, he does not disappear. To hide the player you have to close Chrome. 001

I can’t figure out where you can insert this piece of code to make it work?

let name_regex = /^org\.mpris\.MediaPlayer2\.(?!chrome)/; // exclude chrome
if (name_regex.test(player_name)) {
....
}

I don't need a Chome player. Chrome already has a built-in. https://i.imgur.com/xL31Oco.png

JasonLG1979 commented 4 years ago

This is a Chrome bug. They do not take down their interface after it's not needed anymore. It also has the nasty effect of stealing and never releasing the mediakeys. Their MPRIS implementation is shit.

webmastak commented 4 years ago

But still where you can insert this piece of code to make it work?

let name_regex = /^org\.mpris\.MediaPlayer2\.(?!chrome)/; // exclude chrome
if (name_regex.test(player_name)) {
....
}

Or how else can you exclude Chrome?

JasonLG1979 commented 4 years ago

You can disable mpris in chrome.

webmastak commented 4 years ago

How to do it?

Figured out: chrome://flags/#hardware-media-key-handling Disabled