From 01a3e43ca9f8ebfb2d3085f0c824288b5c763c8e Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 29 Nov 2014 19:11:07 +0100 Subject: manpage: minor fixes Also update the Lua example. The "pause" event was declared deprecated, so the example should use the newer API. --- DOCS/man/lua.rst | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'DOCS/man/lua.rst') 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). -- cgit v1.2.3