mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.73k stars 2.93k forks source link

macOS Touch Bar Support #3943

Closed beschoenen closed 5 years ago

beschoenen commented 7 years ago

Are you guys planning on adding support for the touch bar featured in the new MacBooks?

CounterPillow commented 7 years ago

issue #2679 might be somewhat related, though I'm not sure what you imagine under "Touch Bar Support", since that can include anything from simply media keys to stuff like video moodbar.

What might be neat is an OSC for the touch bar.

beschoenen commented 7 years ago

Well, a scrub bar would be nice, also notifying macOS that something's playing, cause the play/pause button doesn't change when you watch something with mpv.

beschoenen commented 7 years ago

Current Touch Bar

touch bar shot 2016-12-26 at 18 48 14

(The play button does work, but it doesn't change its icon)

Maybe add something like iTunes (With the scrub bar)

touch bar shot 2016-12-26 at 18 50 44
ghost commented 7 years ago

AFAIK @rcombs made some experiments into this direction, but I don't remember much.

rcombs commented 7 years ago

There's a bit of awkwardness when running from CLI without an associated application bundle. I've got a radar in about it.

beschoenen commented 7 years ago

@rcombs Any update on this?

Akemi commented 7 years ago

i added simple Touch Bar support in my branch (alternative a build). functionality should be complete. visuals can probably be improved. code still needs proper cleaning up. the seek bar itunes and quicktime uses, seems to be a none public widgets that needs to be recreated. this should also not be confused with MediaPlayer support. the 'equaliser' icon you can touch when the program is not focused to get the controls of itunes and quicktime seems to be a feature only available in the private part of the MediaPlayer (MediaRemote) framework. so we won't see that feature any time soon.

how it looks like atm. feel free to test and giving feedback. screen shot 2017-02-27 at 04 43 26 screen shot 2017-02-27 at 04 43 13

rcombs commented 7 years ago

Most of the MediaPlayer functionality is available through the MPRemoteCommandCenter framework; only a few things need to be loaded out of the private framework, and none of them are necessary for applications with built-in touch bar support. See my hack job: https://gist.github.com/a2fa5f2fd11560ea11295ec9f294d87f

Akemi commented 7 years ago

indeed what i said is wrong. the 'equaliser' icon appears even without the usage of the private framework. i just fucked up when testing it, forgot to start it from the Bundle and not CLI.

beschoenen commented 7 years ago

These guys got a scrub bar working. Might be a project to look at.

https://github.com/xzzz9097/Muse

cheeexq commented 6 years ago

Any latest news?

A fork of mpv, IINA has got a pretty good scrub bar currently. https://github.com/lhc70000/iina

Argon- commented 6 years ago

IINA is not a fork but a front-end, wrapping a GUI around mpv. When you desire GUI-like functionality then that's what you should use.

Pavel-Guseynov commented 6 years ago

For some reason mpv touch bar support is disabled in official builds. You can enable it by compiling mpv by your own: brew install mpv --HEAD --with-bundle

Akemi commented 5 years ago

there is still a second part for the touch bar support that could be implemented. apparently via the MPRemoteCommandCenter. i have an experimental implementation for that, and still need to test if everything works. we could also probably get rid of the apple remote support via "HIDRemote".

but i guess we don't need to keep this issue open for that.