-
Notifications
You must be signed in to change notification settings - Fork 568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
youtube-music app is overriding my media controls #647
Comments
Do you have if not then the application doesn't actually do anything related to mediakeys, its all native youtube+electron behavior |
Ok so i have tested a bit with that: initially I had the "Override Mediakeys" OFF, and it was overriding the keys as described in the OP. Now I have tried with "Override Mediakeys" ON and the behaviour is a bit inconsistent now: I can pause the latest media played with the media keys on my mouse and on my headphones, but the regular 'media keys' on the keyboard and another keyboard shortcut I have set with autohotkey to Play/Pause media will also still get overridden (they can only control music). The situation is a bit better now, but ideally the keyboard shortcuts were actually the ones I needed the most, to reliably pause lectures while I'm typing notes. Do you have any idea why this might be happening? It seems they might not be using the same kind of 'media' keys maybe. I don't know if it's related at all, but I also can't use the options on the Shortcuts > Set Global Song Controls, as they only show me a white box that I can't interact with (screenshot): https://i.imgur.com/jzfTDqV.png |
sorry about that, it was fixed in #619 but a new version including this fix has yet to be released. (@th-ch is the project owner) |
Indeed enabling 'in-app-menu' made the options in Global Song Controls usable. Although even trying to add a new shortcut in there, didn't solve the media overriding issue. I wonder what is different in the way the app is handling media keys compared to the standard browser version. If there is something that I can test to try to solve this issue I would be happy to try. I don't know if this is happening only on my machine either, because I don't have another pc to test it with atm. |
I have also noticed this behaviour happening in AIMP player actually, I have just tested it. Indeed it seems to 'steal' the media keys as well even if a more recent app is playing media. It might be something in the way windows handles these things, but I don't know if it's possible to make it so that it's the last media played that would get paused/resumed? |
I was wondering if an alternative solution would be feasible: would it be possible to add an (optional) setting to disable YT Music from responding to the normal media keys, and to only respond to the custom shortcut we set on 'Global Song Controls'? (so for example it would not play songs when I press media key play, but it would play it if I press say ALT+P, which would target only YT music now). |
This reminds me of Legcord/Legcord#403 - Might be worth taking a look. // WinRetrieveSuggestionsOnlyOnDemand: Work around electron 13 bug w/ async spellchecking on Windows.
// HardwareMediaKeyHandling,MediaSessionService: Prevent Discord from registering as a media service.
app.commandLine.appendSwitch(
"disable-features",
"WinRetrieveSuggestionsOnlyOnDemand,HardwareMediaKeyHandling,MediaSessionService"
); |
The youtube-music app is overriding my media controls (play/pause for example), so that I can't actually play or pause a more recent media if there is music playing in the background (it will just pause the music).
This is a problem for my user scenario since I would often listen to music in the background, while watching lectures or other video lessons that I need to quickly pause/unpause to take notes (and I use keyboard shortcuts to do so).
Is this intended behaviour, and is there any way to stop this overriding from happening?
I can confirm that I can usually do this with the normal browser version of youtube music.
The text was updated successfully, but these errors were encountered: