summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-05-10 15:26:27 +0200
committerwm4 <wm4@nowhere>2018-05-24 19:56:34 +0200
commit159379980ec8c79608b1adada4b66b1d8c016e4a (patch)
tree39296d3c1a8b75be081e88e037d38e81c3a56a79 /DOCS
parentd7ed3ba4734654f50d577e653179c2c0d729ae30 (diff)
downloadmpv-159379980ec8c79608b1adada4b66b1d8c016e4a.tar.bz2
mpv-159379980ec8c79608b1adada4b66b1d8c016e4a.tar.xz
lua: expose async commands
Might be useful for some.
Diffstat (limited to 'DOCS')
-rw-r--r--DOCS/man/lua.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/DOCS/man/lua.rst b/DOCS/man/lua.rst
index c0c4f9b00a..0dbd7d3c0a 100644
--- a/DOCS/man/lua.rst
+++ b/DOCS/man/lua.rst
@@ -115,6 +115,15 @@ The ``mp`` module is preloaded, although it can be loaded manually with
error. ``def`` is the second parameter provided to the function, and is
nil if it's missing.
+``mp.command_native_async(table [,fn])``
+ Like ``mp.command_native()``, but the command is ran asynchronously (as far
+ as possible), and upon completion, fn is called. fn has two arguments:
+ ``fn(success, result, error)``. ``success`` is always a Boolean and is true
+ if the command was successful, otherwise false. The second parameter is
+ the result value (can be nil) in case of success, nil otherwise (as returned
+ by ``mp.command_native()``). The third parameter is the error string in case
+ of an error, nil otherwise.
+
``mp.get_property(name [,def])``
Return the value of the given property as string. These are the same
properties as used in input.conf. See `Properties`_ for a list of