summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
Diffstat (limited to 'DOCS')
-rw-r--r--DOCS/interface-changes.rst2
-rw-r--r--DOCS/man/javascript.rst5
2 files changed, 6 insertions, 1 deletions
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst
index 3e0347bc7f..efbfdc510e 100644
--- a/DOCS/interface-changes.rst
+++ b/DOCS/interface-changes.rst
@@ -28,6 +28,8 @@ Interface changes
- directories in ~/.mpv/scripts/ (or equivalent) now have special semantics
(see mpv Lua scripting docs)
- names starting with "." in ~/.mpv/scripts/ (or equivalent) are now ignored
+ - js modules: ~~/scripts/modules.js/ is no longer used, global paths can be
+ set with custom init (see docs), dir-scripts first look at <dir>/modules/
--- mpv 0.32.0 ---
- change behavior when using legacy option syntax with options that start
with two dashes (``--`` instead of a ``-``). Now, using the recommended
diff --git a/DOCS/man/javascript.rst b/DOCS/man/javascript.rst
index 49ddb481e4..0a43d213b6 100644
--- a/DOCS/man/javascript.rst
+++ b/DOCS/man/javascript.rst
@@ -139,6 +139,8 @@ success, ``fn`` is called always a-sync, ``error`` is empty string on success.
``mp.get_script_name()``
+``mp.get_script_directory()``
+
``mp.osd_message(text [,duration])``
``mp.get_wakeup_pipe()``
@@ -309,7 +311,8 @@ or ``~/x``. Otherwise it's considered a global module id and searched according
load ``x.js`` at one of the array paths, and id ``foo/x`` tries to load ``x.js``
inside dir ``foo`` at one of the paths.
-The ``mp.module_paths`` array is empty by default.
+The ``mp.module_paths`` array is empty by default except for scripts which are
+loaded as a directory where it contains one item - ``<directory>/modules/``.
``mp.module_paths`` may be updated from a script (preferably via custom init -
see below) which will affect future calls to ``require`` for global module id's
which are not already loaded/cached.