summaryrefslogtreecommitdiffstats
path: root/DOCS/man
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-07-29 00:22:21 +0200
committerwm4 <wm4@nowhere>2014-07-29 00:22:21 +0200
commitecad4a20de3420ec5ffbbcdd96d122ed34e532a5 (patch)
tree546363ef0d57f5668684b70b9e071315d0abca49 /DOCS/man
parentfa34b4920aa372e2fb07b970a9242b41bddccf15 (diff)
downloadmpv-ecad4a20de3420ec5ffbbcdd96d122ed34e532a5.tar.bz2
mpv-ecad4a20de3420ec5ffbbcdd96d122ed34e532a5.tar.xz
manpage: lua: document timer timeout and oneshot fields
Might be useful for scripts, so document them. (Which means scripts are allowed to use them, without risking breakage.)
Diffstat (limited to 'DOCS/man')
-rw-r--r--DOCS/man/lua.rst14
1 files changed, 14 insertions, 0 deletions
diff --git a/DOCS/man/lua.rst b/DOCS/man/lua.rst
index 80467f8f8c..0ab53f0231 100644
--- a/DOCS/man/lua.rst
+++ b/DOCS/man/lua.rst
@@ -299,6 +299,20 @@ The ``mp`` module is preloaded, although it can be loaded manually with
with ``add_timeout()``), this starts the timer from the beginning,
using the initially configured timeout.
+ ``timeout`` (RW)
+ This field contains the current timeout period. This value is not
+ updated as time progresses. It's only used to calculate when the
+ timer should fire next when the timer expires.
+
+ If you write this, you can call ``t:kill() ; t:resume()`` to reset
+ the current timeout to the new one. (``t:stop()`` won't use the
+ new timeout.)
+
+ ``oneshot`` (RW)
+ Whether the timer is periodic (``false``) or fires just once
+ (``true``). This value is used when the timer expires (but before
+ the timer calback function fn is run).
+
``mp.get_opt(key)``
Return a setting from the ``--lua-opts`` option. It's up to the user and