From cbfb6de6675f4cd741dc9a136f8b0ea59bf7ebb7 Mon Sep 17 00:00:00 2001 From: Otto Modinos Date: Wed, 24 Sep 2014 21:17:49 +0300 Subject: lua: add mpv/lua directories to the lua path Signed-off-by: wm4 --- DOCS/man/lua.rst | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'DOCS/man') diff --git a/DOCS/man/lua.rst b/DOCS/man/lua.rst index 147563a964..3b11085503 100644 --- a/DOCS/man/lua.rst +++ b/DOCS/man/lua.rst @@ -2,9 +2,14 @@ LUA SCRIPTING ============= mpv can load Lua scripts. Scripts in ``~/.mpv/lua/`` will be loaded on program -start, or if passed to ``--lua``. mpv provides the built-in module ``mp``, which -provides functions to send commands to the mpv core and to retrieve information -about playback state, user settings, file information, and so on. +start, or if passed to ``--lua``. mpv appends ``~/.mpv/lua`` to the end of +lua's path so you can import them too. Since it's added to the end, don't name +scripts you want to import the same as lua libraries because they will be +overshadowed by them. + +mpv provides the built-in module ``mp``, which provides functions to send +commands to the mpv core and to retrieve information about playback state, user +settings, file information, and so on. These scripts can be used to control mpv in a similar way to slave mode. Technically, the Lua code uses the client API internally. -- cgit v1.2.3