You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The OSC message "osc-visibility" allows the user to cycle between "never", "always" and "auto." I don't find this behavior ideal because I always want to toggle between on/off which means always/never or always/auto, and that's how the other media players I've used work. I wrote the following script that I use in my mpv configuration:
-- Toggles the on screen controller between being always on and either-- automatic mode or completely hidden depending on what the initial visibility-- value was. If this is used in conjunction with "osc-visibility cycle", the-- uncorrelated state used by the two messages may result in neither behaving-- as expected.mp.register_script_message("osc-toggle",
(function ()
localcursorlocalstateslocalosc_conf= {
visibility="auto"
}
(require"mp.options").read_options(osc_conf, "osc")
ifosc_conf.visibility=="auto" thenstates= {"always", "auto"}
elsestates= {"always", "never"}
endcursor=states[2] ==osc_conf.visibilityand2or1returnfunction ()
cursor=cursor==1and2or1mp.commandv(
"script-message", "osc-visibility", states[cursor], "no-osd"
)
endend)()
)
I'm willing to update osc.lua to integrate this logic into the upstream codebase, but I wanted to see if the PR would be welcomed before potentially wasting time on it.
Alternative behavior of the wanted feature
No response
Log File
No response
Sample Files
No response
The text was updated successfully, but these errors were encountered:
Expected behavior of the wanted feature
The OSC message "osc-visibility" allows the user to cycle between "never", "always" and "auto." I don't find this behavior ideal because I always want to toggle between on/off which means always/never or always/auto, and that's how the other media players I've used work. I wrote the following script that I use in my mpv configuration:
I'm willing to update osc.lua to integrate this logic into the upstream codebase, but I wanted to see if the PR would be welcomed before potentially wasting time on it.
Alternative behavior of the wanted feature
No response
Log File
No response
Sample Files
No response
The text was updated successfully, but these errors were encountered: