https://bugs.kde.org/show_bug.cgi?id=375943

--- Comment #58 from pallaswept <[email protected]> ---
(In reply to Milkii B from comment #57)
> fwiw, a method that comes to mind;

Perhaps the reason it came to mind is because that is the method which I
explained my posts above :D Sadly, this method is not possible. Obviously, I've
done a poor job of explaining it. I'll do my best....

> what tab etc relates to the audio

Is not known by anything except the browser, and it ain't telling anyone else.
You can use `pw-cli list-objects Node` to list all the nodes and `pwcli info
<NODE_ID>` to see all of the available metadata on the audio stream which is
set by your browser.

In the case of firefox, the stream metadata already includes the tab title. For
example if I go and watch https://www.youtube.com/watch?v=0bJeg0gwthI I can
see:
*               media.name = "5 Reasons Why KDE Plasma Is the BEST Desktop -
YouTube"

But this is a tab title, and not an identifier of a window that could be used
by the task manager widget.
Since we have the plasma browser integration plugin, and that does have access
to a list of tabs and windows, it could, in theory, determine the window ID
from this tab title from this audio stream metadata, which could theoretically
be used by the task manager to provide per-window mute buttons. 

This is what I meant by 
>We could maybe find that window from the tab title though, so there is some 
>hope, but it would be hard to code and require an extension.

Chromium however, gives us nothing identifiable. Every stream gets a generic
name:
*               media.name = "Playback"

You are welcome to check it yourself but I am quite sure there are no other
properties we could use. Note that the process ID which is present is that of
the browser-wide Audio Service, and not of the window playing the audio stream.

So, this is what I meant by:

> It can't happen here, KDE can not do it. Chromium must fix it. Firefox could 
> improve things, too. But really, this whole thing is blocked by chromium.

idk, perhaps some intrepid developer would care to implement the necessary
changes to the plasma browser integration addon and the task manager, to make
this work with firefox but not with chrome, and then when chromium (or its
derivatives of course) users complain that it doesn't work there, we can send
them to chrome to request them to provide the same functionality. I mean,
perhaps the presence of the feature for firefox may be an incentive for
chromium to come to the party. 

But the job is hard, the approach is a bit of a kludge anyway (really the
browser should tag the stream with the correct window ID directly; working it
out backwards with an extension, is a zip-tied solution) and it might not work
out like that, chromium may just continue not caring.  That's a very expensive
gamble. I'll leave it to such a developer to decide if that's a bet they'd like
to take, and to KDE to decide if that's the kind of thing they want in their
DE.

TL;DR
For the rest of us the punchline is simple: take it to chromium and firefox.
Request that they tag audio streams with metadata including a window ID, on
linux, as they do on Windows. Then, we can have per-window mute buttons, on
linux, as they do on Windows.

I hope that clears it up a bit.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to