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

Option to disable media keys support #1465

Open
stpnwf opened this issue Jun 28, 2021 · 5 comments
Open

Option to disable media keys support #1465

stpnwf opened this issue Jun 28, 2021 · 5 comments
Labels

Comments

@stpnwf
Copy link

stpnwf commented Jun 28, 2021

Is your feature request related to a usage problem (not a bug)? Please describe.
Ubuntu often fails to get media keys to control the right application when there is more than one capable of playing audio open at the same time. Since I always mean for the media keys to control Spotify, I turn off media key support to other applications, like Firefox. I can't do this to Freetube.

Describe the solution you'd like to see implemented
I would like to be able to turn off media key support in Freetube, similarly to how it is possible to do this in Firefox.

Additional context
I only mean for the media keys to control Spotify, and having Freetube and Spotify open messes that behavior up. For example, I often would like to pause the music I am listening to so that I can watch a video on Freetube... Instead video on Fretube plays and I have to go to Spotify, pause manually then go back to Freetube. Having an option to turn off this feature in Freetube would solve my problem.

@blipdrifter
Copy link

Any updates on this? I'd love to be able to do this as well.

@stabilergriller
Copy link

Hello,
I found this thread while searching for the solution for the same problem as described by the creator of the issue.

There's also a related issue at #1230 which has been closed as completed, but despite this there still seems to be no possibility to disable hardware media keys properly, neither in the settings nor in the command line.

With the help of electron/electron#21731 and especially electron/electron#18253 (comment), I was able to figure out that adding

app.commandLine.appendSwitch('disable-features', 'HardwareMediaKeyHandling,MediaSessionService'); in the index.js really blocks all MPRIS related interaction, which would totally solve my problem. But of course, this functionality is used by other users.

Maybe a toggle in the settings menu to switch between enabling and disabling mode would be the best?

@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Member

Suggestion for @Aiz0 maybe a nice followup on the shortcuts PR :)

@dmt-hub
Copy link

dmt-hub commented May 12, 2023

Would also love to have this option available. Thank you!

In the meantime you can run it with media keys disabled like this:
Open terminal
paste this line: /Applications/FreeTube.app/Contents/MacOS/FreeTube -disable-features=HardwareMediaKeyHandling

press enter - now you are running freetube with mediakeys disabled.
Enjoy!

@TBat
Copy link

TBat commented Oct 31, 2023

Thank you @stabilergriller for the workaround! Works exactly as I wanted

For a one-click solution, you can turn it into a batch file:

@echo off
cd "C:\Program Files\FreeTube"
start FreeTube.exe -disable-features=HardwareMediaKeyHandling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

7 participants