mirror of https://github.com/mpv-player/mpv
osc.lua: add script message to show up the OSC
Add a way to briefly show the OSC, which is useful to check file name, playback progress and time left, etc. Fix issue #3826
This commit is contained in:
parent
df6b16c0ca
commit
c9ea2798a4
|
@ -0,0 +1 @@
|
|||
add `osc-show` script message
|
|
@ -499,7 +499,10 @@ in ``input.conf``, or sent by other scripts.
|
|||
|
||||
``osc-visibility``
|
||||
Controls visibility mode ``never`` / ``auto`` (on mouse move) / ``always``
|
||||
and also ``cycle`` to cycle between the modes
|
||||
and also ``cycle`` to cycle between the modes.
|
||||
|
||||
``osc-show``
|
||||
Triggers the OSC to show up, just as if user moved mouse.
|
||||
|
||||
Example
|
||||
|
||||
|
|
|
@ -2925,6 +2925,7 @@ local function idlescreen_visibility(mode, no_osd)
|
|||
end
|
||||
|
||||
mp.register_script_message("osc-visibility", visibility_mode)
|
||||
mp.register_script_message("osc-show", show_osc)
|
||||
mp.add_key_binding(nil, "visibility", function() visibility_mode("cycle") end)
|
||||
|
||||
mp.register_script_message("osc-idlescreen", idlescreen_visibility)
|
||||
|
|
Loading…
Reference in New Issue