summaryrefslogtreecommitdiffstats
path: root/player/lua/osc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'player/lua/osc.lua')
-rw-r--r--player/lua/osc.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index e812e9131d..0b3126282e 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -588,8 +588,11 @@ end
function show_message(text, duration)
+ --print("text: "..text.." duration: " .. duration)
if duration == nil then
duration = tonumber(mp.get_property("options/osd-duration")) / 1000
+ elseif not type(duration) == "number" then
+ print("duration: " .. duration)
end
-- cut the text short, otherwise the following functions
@@ -1926,6 +1929,8 @@ mp.register_event("tracks-changed", request_init)
mp.register_script_message("enable-osc", function() enable_osc(true) end)
mp.register_script_message("disable-osc", function() enable_osc(false) end)
+mp.register_script_message("osc-message", show_message)
+
mp.observe_property("fullscreen", "bool",
function(name, val)
state.fullscreen = val