diff options
author | ChrisK2 <spam@kalania.de> | 2014-12-29 18:26:22 +0100 |
---|---|---|
committer | ChrisK2 <spam@kalania.de> | 2015-01-02 16:48:16 +0100 |
commit | 7f584f68bfc1813383abc5d6da0579dbbf3b3471 (patch) | |
tree | 33558750a6956cab267a82a8b53919834dd33363 /player | |
parent | 4e013afd37c788c5f91e5e91ff7ae5870e80c8b8 (diff) | |
download | mpv-7f584f68bfc1813383abc5d6da0579dbbf3b3471.tar.bz2 mpv-7f584f68bfc1813383abc5d6da0579dbbf3b3471.tar.xz |
OSC: add osc-message script command (wip)
Diffstat (limited to 'player')
-rw-r--r-- | player/lua/osc.lua | 5 |
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 |