Mastermindzh / tidal-hifi

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

Update Mpris Identity #338

Closed Batwam closed 4 months ago

Batwam commented 5 months ago

Hello,

I am using/contributing to a gnome extension to control Tidal Hi-Fi and noticed that the app's sound identifies as chromium which prevents the extension from being able to link the app and the corresponding sound "stream". Is there any way for the app to not identify the sound stream as chromium or this is hard coded somehow? Ideally, this list should show "TIDAL Hi-Fi" and the app mpris Identify be updated to match.

I can't really change the code to control anything called chromium as this could also affect the sound of the user's browser...

image

Mastermindzh commented 5 months ago

Hey,

The chromium instance from Electron will always show up, we haven't found a way to disable it yet. But... if MPRIS is configured correctly it should show a "tidal-hifi" entry which is manually controlled by the app:

image

Batwam commented 5 months ago

Thanks for the response. The Identity field is fine (although it should probably be "TIDAL Hi-Fi") to match the project name while DesktopEntry would remain as tidal-hifi to match the .desktop.

All mpris function work just fine, the challenge is to identify the corresponding VolumeMixer sound "Streams" in Gnome since the player identifies as chromium. I have seen similar behaviour on chromium-based browsers which also all identify as chromium so it looks like it's impossible to know which VolumeMixer stream matches which mpris source.

Anyway, it doesn't look like it's fixable unfortunately so we can probably close this Issue. Thanks again for the quick reaponse.

Mastermindzh commented 5 months ago

mpris doesn't allow the name TIDAL Hi-Fi, which is why we had to keep "tidal-hifi". Can't you change volume through mpris + playername:

playerctl --player=tidal-hifi volume 100

Come to think of it, we might not even have support for that command in TIDAL.

Batwam commented 5 months ago

that's right, it doesn't look like you currently have support for volume control through mpris in tidal-hifi: image

We found this to be the case for a number of mpris sources so you are certainly not alone. Spotify for instance only works with 100 and 0 for some reason and I'm not expecting them to fix it: image

This is why we decided to instead adjust the volume by identifying the VolumeMixer Stream (by name hopefully matching the mpris Identity field) and adjust that instead (it's a gnome extension so we only look at how it's implemented in Gnome).

Batwam commented 4 months ago

mpris doesn't allow the name TIDAL Hi-Fi, which is why we had to keep "tidal-hifi".

by the way, in what way mpris doesn't allow this? Mozilla Firefox has a space in its mpris Identity and works just fine: image

Mastermindzh commented 4 months ago

@Batwam, I'd have to check precisely what it doesn't allow, we've had issues with MPRIS not working when we changed the name, see: https://github.com/Mastermindzh/tidal-hifi/releases/tag/5.7.1

I think it was capitalization.

Anyway, I have researched the possibility of removing the chromium client, and that doesn't seem to be possible. I could try to implement volume control, but I have no idea whether that would help you any further.

Batwam commented 4 months ago

Ok, no problem. No, mpris volume control might be something you might want to implement for others but that won't help me. No worries, thanks for following up, I think that we can close this as "won't fix".

Mastermindzh commented 4 months ago

I'll close it this weekend, I want to do yet more research and have a pretty deep look into the specific issue this time.

Mastermindzh commented 4 months ago

image

😄

Batwam commented 4 months ago

That seems promising, I'll check that out when the new version gets published on flathub.

Do you know how the player is going to show in the Gnome Volume Mixer by any chance?

Mastermindzh commented 4 months ago

I do not. It should just be the same as the current "mpris" interface (so tidal-hifi). I will be able to publish it tonight, but you can also build it yourself to check it out if you want 😄

Batwam commented 4 months ago

No worries, I'll wait for it to get published and let you know. Some (all) chromium based browsers identify as chromium im Gnome's volume Mixer and have a different Identity so it's quite possible that tidal_hi-fi will be same.

Batwam commented 4 months ago

Hey, the version on flathub is still 5.8. Is there a plan to update it?

Mastermindzh commented 4 months ago

Usually, Mar0Xy takes care of those so I didn't do it, but I will have a look tonight if she hasn't gotten to it by then.

Stay tuned 😎

Batwam commented 4 months ago

No worries, just checking as my free Tidal trial is going to expire soon so I won't be able to test anymore 😅

Mastermindzh commented 4 months ago

@Batwam , it's waiting to be merged: https://github.com/flathub/com.mastermindzh.tidal-hifi/pull/21

You can install it from testing if you want 😄. Interested to know your follow-up.

Batwam commented 4 months ago

Just checked the testing version, it shows as tidal hi-fi under mpris and still Chromium in the Volume Mixer so no change as far as this issue is concerned but that's ok.

image

image

Mastermindzh commented 4 months ago

Alright, well then idk what the volume mixer is picking up, probably got some deeper integration than just mpris 😄. Thanks anyway!