You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<dd>Binds a key to an input command. <tt class="docutils literal">cmd</tt> must be a complete command
11800
11800
containing all the desired arguments and flags. Both <tt class="docutils literal">name</tt> and
11801
-
<tt class="docutils literal">command</tt> use the <tt class="docutils literal">input.conf</tt> naming scheme. This is primarily
11802
-
useful for the client API.</dd>
11801
+
<tt class="docutils literal">cmd</tt> use the <tt class="docutils literal">input.conf</tt> naming scheme. <tt class="docutils literal">comment</tt> is an optional
11802
+
string which can be read as the <tt class="docutils literal">comment</tt> entry of <tt class="docutils literal"><span class="pre">input-bindings</span></tt>.
information. They can be manipulated with the <tt class="docutils literal">set</tt>/<tt class="docutils literal">add</tt>/<tt class="docutils literal">cycle</tt>
12688
12689
commands, and retrieved with <tt class="docutils literal"><span class="pre">show-text</span></tt>, or anything else that uses property
12689
12690
expansion. (See <a class="reference internal" href="#property-expansion">Property Expansion</a>.)</p>
12690
-
<p>The property name is annotated with RW to indicate whether the property is
12691
-
generally writable.</p>
12692
12691
<p>If an option is referenced, the property will normally take/return exactly the
12693
12692
same values as the option. In these cases, properties are merely a way to change
12694
12693
an option at runtime.</p>
12694
+
<p>Note that many properties are unavailable at startup. See <a class="reference internal" href="#details-on-the-script-initialization-and-lifecycle">Details on the script
12695
+
initialization and lifecycle</a>.</p>
12695
12696
</div>
12696
12697
<div class="section" id="property-list">
12697
12698
<h2>Property list</h2>
@@ -12752,8 +12753,7 @@ <h2>Property list</h2>
12752
12753
<dd>Full path of the currently played file. Usually this is exactly the same
12753
12754
string you pass on the mpv command line or the <tt class="docutils literal">loadfile</tt> command, even
12754
12755
if it's a relative path. If you expect an absolute path, you will have to
12755
-
determine it yourself, for example by using the <tt class="docutils literal"><span class="pre">working-directory</span></tt>
12756
-
property.</dd>
12756
+
determine it yourself, for example by using the <tt class="docutils literal"><span class="pre">normalize-path</span></tt> command.</dd>
<dd>The full path to the currently played media. This is different from
12759
12759
<tt class="docutils literal">path</tt> only in special cases. In particular, if <tt class="docutils literal"><span class="pre">--ytdl=yes</span></tt> is used,
@@ -15618,7 +15618,8 @@ <h2>Details on the script initialization and lifecycle</h2>
15618
15618
timers added with <tt class="docutils literal">mp.add_timeout</tt> or similar. Note that since the
15619
15619
script starts execution concurrently with player initialization, some properties
15620
15620
may not be populated with meaningful values until the relevant subsystems have
15621
-
initialized.</p>
15621
+
initialized. Rather than retrieving these properties at the top of scripts, you
15622
+
should use <tt class="docutils literal">mp.observe_property</tt> or read them within event handlers.</p>
15622
15623
<p>When the player quits, all scripts will be asked to terminate. This happens via
15623
15624
a <tt class="docutils literal">shutdown</tt> event, which by default will make the event loop return. If your
15624
15625
script got into an endless loop, mpv will probably behave fine during playback,
0 commit comments