mirror of https://github.com/mpv-player/mpv
DOCS/man/input: note that properties can be unavailable on init
It comes up often in IRC and issues that users don't understand why the path property is initially unavailable, so link the section that mentions it from the Properties section, and expand on how to get these properties.
This commit is contained in:
parent
6085261146
commit
4def28ad0d
|
@ -1940,6 +1940,9 @@ If an option is referenced, the property will normally take/return exactly the
|
||||||
same values as the option. In these cases, properties are merely a way to change
|
same values as the option. In these cases, properties are merely a way to change
|
||||||
an option at runtime.
|
an option at runtime.
|
||||||
|
|
||||||
|
Note that many properties are unavailable at startup. See `Details on the script
|
||||||
|
initialization and lifecycle`_.
|
||||||
|
|
||||||
Property list
|
Property list
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,8 @@ own event handlers which you have registered with ``mp.register_event``, or
|
||||||
timers added with ``mp.add_timeout`` or similar. Note that since the
|
timers added with ``mp.add_timeout`` or similar. Note that since the
|
||||||
script starts execution concurrently with player initialization, some properties
|
script starts execution concurrently with player initialization, some properties
|
||||||
may not be populated with meaningful values until the relevant subsystems have
|
may not be populated with meaningful values until the relevant subsystems have
|
||||||
initialized.
|
initialized. Rather than retrieving these properties at the top of scripts, you
|
||||||
|
should use ``mp.observe_property`` or read them within event handlers.
|
||||||
|
|
||||||
When the player quits, all scripts will be asked to terminate. This happens via
|
When the player quits, all scripts will be asked to terminate. This happens via
|
||||||
a ``shutdown`` event, which by default will make the event loop return. If your
|
a ``shutdown`` event, which by default will make the event loop return. If your
|
||||||
|
|
Loading…
Reference in New Issue