Skip to content
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

Media buttons in the keyboard are not working as expected (play/pause) #376

Closed
2 tasks done
marcosalcazar opened this issue Sep 11, 2020 · 27 comments
Closed
2 tasks done
Labels
Bug Something isn't working More Info Needed Further information is requested YTMD V1 Issue or Feature is already fixed in YTMD V2 / No longer applicible in YTMD V2 Source code

Comments

@marcosalcazar
Copy link

  • I understand that YTMDesktop have NO affiliation with Google or YouTube.
  • I verified that there is no open issue for the same subject.

Describe the bug
Media keys are not working for ytmdesktop

To Reproduce
Steps to reproduce the behavior:

  1. Open the app
  2. Hit the "play/pause" button in the keyboard
  3. ERROR: Music doesn't start
  4. Play music (clicking in the play icon in the app)
  5. Music starts
  6. Hit the "play/pause" button in the keyboard
  7. ERROR: Music doesn't pause.

Expected behavior
When having the app opened, I should be able to use the media keys in my keyboard to control the music playback (play, pause)

Screenshots
No screenshots.

Environment (please complete the following information):

  • YTMDesktop version: 1.13.0
  • OS: Linux
  • OS version: Kubuntu 20.04
  • Arch: x64
  • Installation way: snapcraft
@tkoopa
Copy link

tkoopa commented Sep 13, 2020

Same Issue with

  • YTMDesktop version: 1.13.0
  • OS: Linux
  • OS version: Ubuntu 16.04
  • Arch: x64
  • Installation way: snap install

@Fwank49
Copy link

Fwank49 commented Sep 20, 2020

I have a similar Issue (media keys for play/pause and forward/back don't work, but custom hotkeys work for those actions) with the following platform:

YTMDesktop version: 1.13.0
OS: Windows
OS version: Windows 10 2004
Arch: x64
Installation way: .exe binary installer

@aristov
Copy link

aristov commented Sep 20, 2020

Same issue with

  • YTMDesktop version: 1.12.1
  • OS: Mac OS
  • OS version: Catalina 10.15.6
  • Arch: x64
  • Installation way: .dmg binary installer

@brianredbeard
Copy link

brianredbeard commented Sep 21, 2020

I was experiencing this... turns out it was Google Chrome. In Chrome version 73 direct support for hardware media keys was added.

After disabling "Hardware Media Key Handling" and relaunching Chrome everything worked great in ytmdesktop.

chrome://flags/#hardware-media-key-handling

image

@Fwank49
Copy link

Fwank49 commented Sep 21, 2020

I was experiencing this... turns out it was Google Chrome. In Chrome version 73 direct support for hardware media keys was added.

After disabling "Hardware Media Key Handling" and relaunching Chrome everything worked great in ytmdesktop.

chrome://flags/#hardware-media-key-handling

image

This does work, (I also had to remove the extension streamkeys from chrome) but other apps (eg GPMDP) have no problem using media keys without having to turn this off in chrome, so I'd still consider this an issue.

@tkoopa
Copy link

tkoopa commented Sep 22, 2020

I was experiencing this... turns out it was Google Chrome. In Chrome version 73 direct support for hardware media keys was added.

After disabling "Hardware Media Key Handling" and relaunching Chrome everything worked great in ytmdesktop.

chrome://flags/#hardware-media-key-handling

image

This only partially works for me, I can now use assigned shortcuts again but actual media keys still don't respond.

Edit: Just realised it makes things worse, on Ubuntu 16.04 when the YT app is running I can no longer use shortcuts and hotkeys for navigating the Desktop. Reverting the setting in Chrome for now

@aristov
Copy link

aristov commented Sep 22, 2020

I was experiencing this... turns out it was Google Chrome. In Chrome version 73 direct support for hardware media keys was added.

After disabling "Hardware Media Key Handling" and relaunching Chrome everything worked great in ytmdesktop.

chrome://flags/#hardware-media-key-handling

image

Doesn't work for me.

@psbrowand
Copy link

psbrowand commented Sep 22, 2020

Same issue here. I had to disable Hardware Media Key Handling in Chrome as stated above. I also had to remove the Google Music Extension.

A good way to test if it's a setting or extension in Chrome that's giving you the issue is to close out of Chrome completely (it may still be open in your Hidden icons on the bottom right of the taskbar). If you can use Media controls when Chrome is closed, it's either a setting or extension causing the issue.

@seckela
Copy link

seckela commented Sep 24, 2020

Same issue. Touch Bar Media Controls on my macbook pro.

Note I've disabled Chrome's Hardware Media Key option as well.

  • YTMDesktop version: 1.12.1
  • OS: Mac OS
  • OS version: Catalina 10.15.6
  • Arch: x64
  • Installation way: .dmg binary installer

@fronders
Copy link

fronders commented Sep 25, 2020

I had the same issue until I removed Google Play App from Chrome, disabled Hardware Media Key Handling and restarted Chrome - now it works

  • YTMDesktop version: 1.13.0
  • OS: Windows
  • OS version: Windows 10 2004
  • Arch: x64
  • Installation way: .exe binary installer

@TobiasDeBruijn
Copy link

Confirmed for me as well. No G Play App installed on Chrome. Tried with HW Media Key Handling disabled and enabled.

  • YTMDesktop Version: 1.13.0
  • OS: Windows
  • OS Version: Windows 10; 10.0.18363 build 18363; (1909)
  • Arch: x64
  • Installation: .exe installer, updated through app's build-in updater

@nassoo
Copy link

nassoo commented Oct 13, 2020

Same issue.

I've disabled Chrome's Hardware Media Key, but the media keys still don't work (and they work everywhere else except in this app).

YTMDesktop version: 1.13.0
OS: Mac OS
OS version: Mojave 10.14.6
Arch: x64
Installation way: .dmg binary installer

@Erj4
Copy link

Erj4 commented Oct 13, 2020

As a summary for those having issues now and in the future, these were the changes I needed to make:

@remorsecodex
Copy link

As a summary for those having issues now and in the future, these were the changes I needed to make:

  • Ensure that the hardware media key handling is disabled as mentioned by @brianredbeard (#376 (comment))
  • Disable any chrome extensions that consume the media keys (eg Streamkeys)
  • Make sure "Enable Windows 10 media service" is on in ytmdesktop settings - Integrations

Just chirping in to say, doing all of these solved the issue for me right away.

@iamhenry
Copy link

iamhenry commented Nov 2, 2020

Tried the steps mentioned here but still doesn't work.

Same issue with

YTMDesktop version: 1.13.0
OS: Mac OS
OS version: Catalina 10.15.7
Arch: x64
Installation way: .dmg binary installer

@remorsecodex
Copy link

Seems the fix above only works for Windows users.

@tkoopa
Copy link

tkoopa commented Nov 3, 2020

Yes, it doesn't work on Linux either

@gdold
Copy link

gdold commented Nov 21, 2020

I had the same issue under Windows 10, app v1.13.0, the play/pause media keys worked for other software but not in YTMD.

I got it working by enabling both Enable Windows 10 media service and Show track information next to the Windows 10 volume bar, and now play/pause works as expected.

I'm guessing this isn't particularly helpful for our Linux/Mac comrades! 😐

@chadxz
Copy link
Contributor

chadxz commented Dec 11, 2020

Same issue with

YTMDesktop version: 1.13.0
OS: Mac OS
OS version: Big Sur 11.0.1
Arch: x64
Installation way: homebrew

When I press my play/pause key on my keyboard, Apple Music pops up instead. I tried disabling the "hardware media key handling" in Chrome as mentioned above but it did not make a difference.

Edit: nevermind, I found #205 and it led me to a solution that worked for me: clone the repo, upgrade electron to something >= v11, and rebuild the native client. Then go into "security and privacy" MacOS preferences and add YTM Desktop Player as an "Accessibility" app. At that point the media controls worked for me.

Edit2: Although the media keys on my keyboard are working after upgrading electron, my Airpods Pro media controls (squeeze for play/pause) are still not functioning properly.

@BongoEADGC6
Copy link

Still having the lack of media key issue with Kubuntu 20.04 with YTMDesktop 1.13

Any plans to release the newer version with the Electron update?

@victor-roswell
Copy link

@chadxz worked perfectly thanks!

@BongoEADGC6 What version of MacOs are you running?

@BongoEADGC6
Copy link

@victor-roswell I am not using Mac. I am using Kubuntu Linux (Ubuntu with KDE)

@Alipoodle Alipoodle added Bug Something isn't working More Info Needed Further information is requested labels Oct 11, 2021
@AndrazP
Copy link

AndrazP commented Feb 26, 2022

Solution that worked for me on macOS Montery 12.2.1:
Enable Accessibility for the app in system settings:
Screenshot 2022-02-26 at 09 45 11

@ytmdesktop ytmdesktop deleted a comment from janacm May 24, 2022
@MaxMatti
Copy link

MaxMatti commented Sep 26, 2022

Same issue with:

  • YTMDesktop version: 1.13.0
  • OS: Linux
  • OS version: Ubuntu 20.04 with KDE
  • Arch: x64
  • Installation way: snapcraft

Also there is no "Windows 10 media controls" setting under integrations (or anywhere) so I am not able to use that fix (which makes it work fine on my Archlinux-machines with KDE, it also integrates nicely into kdeconnect and KDEs media controls)
Screenshot_20220926_105000

Edit: Multimedia keys work now, without changing anything. The only thing that changed is a pipewire update which I installed after starting ytmd but before noticing that the keys work.

@hazzery
Copy link

hazzery commented Apr 29, 2023

I believe I am having a similar issue

YTMDesktop version: 1.13.0
OS: Linux
OS version: Ubuntu 22.04.2 LTS
Arch: x64
Installation way: snap store

However when I press play/forward/backward I get the following on my screen.
image

Using the other keyboard shortcuts (e.g.ctrlshiftspace to pause) works fine however.

@Alipoodle Alipoodle added the YTMD V1 Issue or Feature is already fixed in YTMD V2 / No longer applicible in YTMD V2 Source code label Aug 1, 2023
@Alipoodle
Copy link
Member

Closing this PR in the move to YTMD v2

@hazzery
Copy link

hazzery commented Jan 30, 2024

This error still occurs on YTMD v2.0.0 on Ubuntu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working More Info Needed Further information is requested YTMD V1 Issue or Feature is already fixed in YTMD V2 / No longer applicible in YTMD V2 Source code
Projects
None yet
Development

No branches or pull requests