Open sy6sy2 opened 6 years ago
@SylvainCecchetto Are you able to let me know your system configuration, whether the Now Playing widget in Notification Centre updates and version of macOS please.
Hum, just upgrade to Mojave last night and now any of my media keys work :-/ But the Notification Center works well
I've updated to Mojave and confirmed that these are working. Ensure no other app is taking control of the media keys.
Same here (Mojave). Play/pause work fine, previous/next don't :(
@SylvainCecchetto, did you get it to work?
Likewise, I'm on Mojave and I don't believe I have any other media-key apps taking control.
The original reported issue here is isolated to the next/previous track keys only (play/pause is just fine)
If something else was taking control of the media keys, play/pause would also not be working, right?
Potentially worth noting is that even when in the app and it has the focus, neither previous/next keys work, and attempting to click on previous/next icons within the notification centre ALSO has no effect. Play/pause works fine across all three situations.
There's definitely something up here, and I can't be 100% sure that it's the app, but I can't see what else it could be.
I’m re-opening this and will investigate further. Are you able to check the Now Playing widget in the Notification Centre?
"Now Playing" in the Notification Centre for me displays the song name when paused, and "Youtube Music" when playing. Clicking on Play/Pause works fine, but clicking on Next or Previous doesn't do anything other than offer highlight feedback to show that it was clicked.
I've attached a zipped up video of me interacting with it :) I also move my cursor up and interact with the play/pause key (which works) as well as prev/next (which doesn't) on the keyboard.
Screen Recording 2018-11-08 at 14.46.54.zip
Edit: I updated to the lasted macOs (10.14.1) which of course involved a full restart. The first thing I did after logging in was boot up YT music and try the media keys. No difference, unfortunately.
Exactly the same behavior reported by @theinfamousmielie about the Notification Center and next/prev keys (Mojave)
Mojave now requires app to request "accessibility permissions" in order to manage prev/next, example - https://github.com/simon-fraser/MusicTube-Player
@midN Thanks for the heads up!
That's actually only the case if you're not using the API for media centre support. Prior to this apps (like Spotify) would listen for the key inputs from Apple Events which requires accessibility support.
In this case, the issue seems to be my workaround that is required for 10.13 and earlier of looping a silent track in the background to retain control isn't working. I believe it's no longer necessary and I'm going to try removing it for 10.14.
Same over here :/
I don't have any icon or title in the "taskbar" at the top though, I have to go back to the YTmusic window everytime. All I get are the song notifications in the notification center on the right.
macOs Mojave 10.14.2
Touchbar: Play/Pause works fine. Next/Previous doen't work, but holding them down for long speeds up the audio until releasing. - both if window is in focus or minimized
Right clicking dock item "Next" "Previous" works fine.
Has prev/next issue as well. macos 10.14.2 (18C54)
I found more detail about this bug, in my case when I close application and run it again, hotkeys works fine just once. Reproduce:
if it will be useful I can add logs
It feels like buttons "next" and "previous" do not work like global hotkeys because
Same issue for me.
YT Music app version: Version 1.0.6 (8) Mac OS Mojave 10.14.2
Prev and next media keys not working while play/pause works fine. All I see in the notification centre are next song notifications, there is no any player there.
Same issue for me. YT Music app version: Version 1.0.6 (8) Mac OS High Sierra 10.13.6 Prev and next media keys not working while play/pause works fine. Hope have ideas about how to fix this.
same issue here. YT Music app version: Version 1.0.6 (8) Mac OS Mojave 10.14.3
You can stop commenting guys, i don't think owner is developing it anymore. Last updates were almost a year ago. They are all outdated and forgotten.
However check https://github.com/lamazingco/playme, this seems to be the only one with working playback keys on latest mac os
Find interesting thing "Next" and "Prev" buttons works like forward and rewind, try to press and hold.
Do you plan to fix this issue? It's a bit annoying to open app every time I want skip track...
I don't think there is an active maintainer for this repo. There is a PR #57 with the fix waiting to be merged.
@steve228uk - Could you give someone else write access to start merging PRs at least please?
confirm that https://github.com/lamazingco/playme works, but pay attention to popup about accessibility on Mac, otherwise media keys wont work
The issue is still reproducing. Stop/Start buttons work well, as well as fast forward and fast backward, but I can't skip the song or move to the previous one.
Notification center widget works in the same way(works everything except Next and Previous keys)
macOS version: Mojave 10.14.6 YT Music version: 1.0.6 (8) MacBook Pro (Retina, 15-inch, Mid 2015)
Still not working in macOs Catalina
I've just noticed an interesting thing - if I open YouTube music or SoundCloud in Safari it behaves in the same way(play next/prev media keys doesn't work).
It seems it's a safari issue (maybe this app uses something like embedded safari web view to render YouTube music page).
FYI: using forked and solved version of keiohtani https://github.com/keiohtani/YouTube-Music/releases/tag/1.0.7 is working for me
or alternative using native browser(chrome, safari) with beardedspice with import youtube music rule is working
I found a much better solution: Using Chrome:
Using Chrome:
- Go to https://music.youtube.com
- Click Options (3 dots) -> More Tools -> Create Shortcut. Make sure you check "Open as window".
- Done. Search for "Youtube Music" in your system apps :) It has a dedicated launcher/icon in dock, the window does not have any browser wrapper/toolbars/etc, and all media keys work! And it appears on alt-tab and all that, because it's basically a system app.
Works very well for any webapp.
alternative using native browser(chrome, safari) with beardedspice with import youtube music rule is working
I had issue with the default YT Music rules, and it looks like the imported one did the trick.
Thanks!
I found a much better solution: Using Chrome:
- Go to music.youtube.com
- Click Options (3 dots) -> More Tools -> Create Shortcut. Make sure you check "Open as window".
- Done. Search for "Youtube Music" in your system apps :) It has a dedicated launcher/icon in dock, the window does not have any browser wrapper/toolbars/etc, and all media keys work! And it appears on alt-tab and all that, because it's basically a system app.
But with caveats:
Same here, rewind and fast-forward keys are not working on 10.15.7 15-inch 2018 Macbook Pro. Pause/play works.
Hey folks! I've been playing with this issue for a bit, and while I can explain why it's happening, I don't yet know how to fix it.
So it turns out that macOS has a policy where, whichever app starts playing last is considered the "now playing" app, and it has control over the media keys.
While YT Music is an app (Stop me if I'm going too fast. 🤣), the actual WKWebView
it uses to render the website (By Apple's own standards) lives in a separate app process. So when a song starts playing, even though YT Music started it, the WKWebView
"app" takes over control of the media keys. So while this process can play and pause, it doesn't have access to any of the YouTube contextual info to know what to do if the user hits "next", so it just doesn't enable those buttons.
Doing some interim research, this looks like a problem other people have had, and apparently even Apple has gone on the record as "This was an intentional implementation detail".
YT Music actually has code to try and fix this. When playing a song, the app itself plays a silence.mp3
audio file in order to try and force the system to give control back to it. This seemed to work on older systems, but hasn't worked recently.
So with that in mind, I'm not sure how to go about fixing this. It would seem the easiest way would be to trick the WKWebView
into not assuming control of the playing video, but I have no idea if this is even possible. The "brute force" alternative would be to pull an Electron and bake in our own rendering engine, but that seems like it would drastically blow out the complexity of this app.
In any case, if anyone has any other ideas I may have missed, please feel free to continue the discussion here. :)
Hope that helps!
I can use the play and skip keys on my keyboard, just not in the now playing widget
Looking through my settings it seems I enabled Accessibility permissions for YT music in Security & Privacy some time ago
Hello!
My Play/Pause media key works well but the next and previous ones don't work with me.
Thank you!