mirror of
https://github.com/mpv-player/mpv
synced 2025-01-18 04:51:52 +00:00
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.)
This commit is contained in:
parent
fa34b4920a
commit
ecad4a20de
@ -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,
|
with ``add_timeout()``), this starts the timer from the beginning,
|
||||||
using the initially configured timeout.
|
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)``
|
``mp.get_opt(key)``
|
||||||
Return a setting from the ``--lua-opts`` option. It's up to the user and
|
Return a setting from the ``--lua-opts`` option. It's up to the user and
|
||||||
|
Loading…
Reference in New Issue
Block a user