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

Play/Pause with TWS headphones put on/take off #10606

Closed
natural-harmonia-gropius opened this issue Sep 3, 2022 · 7 comments
Closed

Play/Pause with TWS headphones put on/take off #10606

natural-harmonia-gropius opened this issue Sep 3, 2022 · 7 comments

Comments

@natural-harmonia-gropius
Copy link
Contributor

TWS headphones support put on to play, take off to pause, It works with Youtube in edge browser. But with MPV, take off triggered the PLAYPAUSE in input.conf, put on does nothing.

@Traneptora
Copy link
Member

Do you know what key is triggered at all when you put on these headphones?

@natural-harmonia-gropius
Copy link
Contributor Author

I don't know.

With mpv --input-test --force-window --idle when I take off it only shows PLAYPAUSE. nothing with put on.

[input] Key PLAYPAUSE is bound to:
[input] 1.  'cycle pause' in <builtin>:1 (default)
[input] 2.  'cycle pause' in D:/OneDrive/应用/mpv/portable_config/input.conf:80

@natural-harmonia-gropius
Copy link
Contributor Author

I think it's not a KeyboardEvent, mpv have same behaviors as window.addEventListener("keydown", (event) => { console.log(event) });

Should this issue keep open?

@Traneptora
Copy link
Member

You can use some third-party software like AutoHotKey to log all events to see what sort of event it looks like, but if mpv doesn't have it registered then --input-test won't be able to detect it. See recent patches about F13 through F25 as an example. (Windows doesn't have this feature built-in, unfortunately.)

@natural-harmonia-gropius
Copy link
Contributor Author

natural-harmonia-gropius commented Sep 5, 2022

@qwerty12
Copy link

qwerty12 commented Sep 6, 2022

One of the plugins that integrate mpv with Windows' media controls might enable this as a "side effect":

@natural-harmonia-gropius
Copy link
Contributor Author

natural-harmonia-gropius commented Sep 7, 2022

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

No branches or pull requests

3 participants