jgreco / mpv-youtube-quality

A userscript for MPV that allows you to change youtube video quality (ytdl-format) on the fly
368 stars 37 forks source link

[FEATURE REQUEST] Add an Icon in the OSD to display the selection menu #2

Closed lord-re closed 5 years ago

lord-re commented 5 years ago

Is it possible to add an icon in the OSD (next to fullscreen) to summon the menu ? No need to remember a new hotkey with this.

jgreco commented 5 years ago

I've just pushed a commit (https://github.com/jgreco/mpv-youtube-quality/commit/94d9ad0e57fc16d8b602ca5da96c6cf68677b079) that adds such an OSC icon: [≚] screen shot 2018-11-08 at 3 23 43 pm

Please note that extending the OSC is a little bit of a hack, to make this work you'll need to to copy both youtube-quality.lua and youtube-quality-osc.lua into your scripts directory. You will also need to put osc=no into your mpv.conf to disable the default OSC (youtube-quality-osc.lua is a copy of mpv's default osc.lua, with the requested icon patched into it).

Please also note that if you're already using a userscript that extends the OSC, like mpv_thumbnail_script, this will conflict. It's possible to combine them so you can use both, I have a demonstration of how to do that here: https://gist.github.com/jgreco/eadb5704754bda55e4b450c1bf3b8353

lord-re commented 5 years ago

Wow. So fast ! Thanks a lot.

Understood.