diff options
author | wm4 <wm4@nowhere> | 2018-05-12 18:48:35 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2018-05-24 19:56:34 +0200 |
commit | dbe831bd025d34930b97c493d9ef61278408cf46 (patch) | |
tree | 3430a50e39d1785b5ba919bd5180bdc67dfcf6e0 /DOCS/man | |
parent | 9c530c7ee9ac0641e58ac1203bd46675e8700cc5 (diff) | |
download | mpv-dbe831bd025d34930b97c493d9ef61278408cf46.tar.bz2 mpv-dbe831bd025d34930b97c493d9ef61278408cf46.tar.xz |
lua: expose mpv_abort_async_command()
Also somewhat cleans up mp.command_native_async() error handling.
Diffstat (limited to 'DOCS/man')
-rw-r--r-- | DOCS/man/lua.rst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/DOCS/man/lua.rst b/DOCS/man/lua.rst index b2e244b6b5..10da40016c 100644 --- a/DOCS/man/lua.rst +++ b/DOCS/man/lua.rst @@ -134,6 +134,18 @@ The ``mp`` module is preloaded, although it can be loaded manually with by ``mp.command_native()``). The third parameter is the error string in case of an error, nil otherwise. + Returns a table with undefined contents, which can be used as argument for + ``mp.abort_async_command``. + + If starting the command failed for some reason, ``nil, error`` is returned, + and ``fn`` is called indicating failure, using the same error value. + +``mp.abort_async_command(t)`` + Abort a ``mp.command_native_async`` call. The argument is the return value + of that command (which starts asynchronous execution of the command). + Whether this works and how long it takes depends on the command and the + situation. The abort call itself is asynchronous. Does not return anything. + ``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 |