Mastermindzh / tidal-hifi

The web version of Tidal running in electron with hifi support thanks to widevine.
Other
1.05k stars 60 forks source link

[FR] Change Application Name to make tidal unique in pipewire #372

Closed Zombiefleischer closed 7 months ago

Zombiefleischer commented 7 months ago

Can you change the application name, so pipewire can differentiate this Chromium application from the others, so that I can assign Tidal to another Audio interface? I'm using the goxlr and I want tidal to be separate on my music channel. Atm when I change this application's output to 'GoXLR Music' every Chromium application after that also change to 'GoXLR Music' and vice versa. As far as I know, Spotify is also just an Electron app, and it differentiates to other applications.

The output of pw-cli:

❯ pw-cli info 176
        id: 176
        permissions: rwxm-
        type: PipeWire:Interface:Client/3
*       properties:
*               pipewire.protocol = "protocol-native"
*               pipewire.sec.socket = "pipewire-0"
*               pipewire.sec.pid = "5825"
*               pipewire.sec.uid = "1000"
*               pipewire.sec.gid = "100"
*               pipewire.sec.label = "kernel"
*               module.id = "2"
*               object.id = "176"
*               object.serial = "530"
*               client.api = "pipewire-pulse"
*               pulse.server.type = "unix"
*               application.name = "Chromium input"
*               application.process.id = "39540"
*               application.process.user = "<redacted>"
*               application.process.host = "<redacted>"
*               application.process.binary = "tidal-hifi"
*               application.language = "en_US.UTF-8"
*               window.x11.display = ":0"
*               application.process.machine-id = "<redacted>"
*               application.process.session-id = "9"
*               config.name = "pipewire-pulse.conf"
*               cpu.max-align = "32"
*               default.clock.rate = "48000"
*               default.clock.quantum = "1024"
*               default.clock.min-quantum = "32"
*               default.clock.max-quantum = "2048"
*               default.clock.quantum-limit = "8192"
*               default.video.width = "640"
*               default.video.height = "480"
*               default.video.rate.num = "25"
*               default.video.rate.denom = "1"
*               log.level = "2"
*               clock.power-of-two-quantum = "true"
*               link.max-buffers = "64"
*               mem.warn-mlock = "false"
*               mem.allow-mlock = "true"
*               settings.check-quantum = "false"
*               settings.check-rate = "false"
*               core.version = "1.0.3"
*               core.name = "pipewire-<redacted>-5825"
*               pipewire.access = "unrestricted"
Mastermindzh commented 7 months ago

We've tried several things to remove the chrome instance but none of them seem to work all too well. You can also disable the chromium instance explicitly:

--disable-features=MediaSessionService

You can then enable the mpris settings in the settings menu and that'll give you a media instance called "tidal-hifi" which you can modify separately.

Zombiefleischer commented 7 months ago

I tried, and it still shows up as Chromium input or Chormium [Playback] in qpwgraph. Do you know any way to refer to application.process.binary = "tidal-hifi" in pw scripts and change the output through that?

Mastermindzh commented 7 months ago

@Zombiefleischer, I have no idea about anything pipewire, to be honest, I just installed it last week but am not doing anything advanced with routing.

When I start playing, using playerctl I have a dedicated entry for tidal-hifi, instead of chromium: image

What does your playerctl show?

Zombiefleischer commented 7 months ago

My playerctl list this:

❯ playerctl -l
firefox.instance_1_91
tidal-hifi

But as far as I can see, I cannot change the output device.

Mastermindzh commented 7 months ago

Weird, so the changes for playerctl seems to work. Well yeah, no clue how to help further, sorry!

Zombiefleischer commented 7 months ago

Still thank you for your time :)

Mastermindzh commented 7 months ago

@Zombiefleischer, no worries! I try my best!