aboutsummaryrefslogtreecommitdiffhomepage
path: root/DOCS/man/lua.rst
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2014-11-29 19:11:07 +0100
committerGravatar wm4 <wm4@nowhere>2014-11-29 19:11:07 +0100
commit01a3e43ca9f8ebfb2d3085f0c824288b5c763c8e (patch)
tree547e6f4fb5c8246a737f68e10e35c172dd8c08af /DOCS/man/lua.rst
parenta399339b95501b6bfa93d30aff5128fe627e97fd (diff)
manpage: minor fixes
Also update the Lua example. The "pause" event was declared deprecated, so the example should use the newer API.
Diffstat (limited to 'DOCS/man/lua.rst')
-rw-r--r--DOCS/man/lua.rst11
1 files changed, 5 insertions, 6 deletions
diff --git a/DOCS/man/lua.rst b/DOCS/man/lua.rst
index 57c1c35e5d..cae764e22e 100644
--- a/DOCS/man/lua.rst
+++ b/DOCS/man/lua.rst
@@ -22,10 +22,12 @@ A script which leaves fullscreen mode when the player is paused:
::
- function on_pause()
- mp.set_property("fullscreen", "no")
+ function on_pause(name, value)
+ if pause == true then
+ mp.set_property("fullscreen", "no")
+ end
end
- mp.register_event("pause", on_pause)
+ mp.observe_property("pause", "bool", on_pause_change)
This script provides a pretty weird feature, but Lua scripting was made to
allow users implement features which are not going to be added to the mpv core.
@@ -720,9 +722,6 @@ List of events
``command-reply``
Undocumented (not useful for Lua scripts).
-``script-input-dispatch``
- Undocumented (used internally).
-
``client-message``
Undocumented (used internally).