diff options
Diffstat (limited to 'player')
-rw-r--r-- | player/lua/defaults.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/player/lua/defaults.lua b/player/lua/defaults.lua index 80630d20b6..4904e93b85 100644 --- a/player/lua/defaults.lua +++ b/player/lua/defaults.lua @@ -1,3 +1,5 @@ + +-- these are used internally by lua.c mp.UNKNOWN_TYPE.info = "this value is inserted if the C type is not supported" mp.UNKNOWN_TYPE.type = "UNKNOWN_TYPE" @@ -360,4 +362,15 @@ _G.mp_event_loop = function() end end +-- additional helpers + +function mp.osd_message(text, duration) + if not duration then + duration = "-1" + else + duration = tostring(math.floor(duration * 1000)) + end + mp.commandv("show_text", text, duration) +end + return {} |