From 6fb3ac1bc7edb59ac4ffd4358f37259b50077b6f Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Fri, 31 Jan 2025 15:47:37 +0100 Subject: [PATCH] Revert "DOCS/man/input: document that shutdown is sent when scripts terminate" This reverts commit 86383aef9523219ff6724792739319835eb61c8b. shutdown isn't actually sent on exit() but only with internal options, e.g. set osc no, which isn't relevant for users. --- DOCS/man/input.rst | 4 ++-- DOCS/man/javascript.rst | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index cb07562fa9..98c1a73098 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -1754,8 +1754,8 @@ This list uses the event name field value, and the C API symbol in brackets: Start of playback after seek or after file was loaded. ``shutdown`` (``MPV_EVENT_SHUTDOWN``) - Sent when the player quits or when a script terminates. Normally handled - automatically. See `Details on the script initialization and lifecycle`_. + Sent when the player quits, and the script should terminate. Normally + handled automatically. See `Details on the script initialization and lifecycle`_. ``log-message`` (``MPV_EVENT_LOG_MESSAGE``) Receives messages enabled with ``mpv_request_log_messages()`` (Lua: diff --git a/DOCS/man/javascript.rst b/DOCS/man/javascript.rst index b4ab363444..cd7f48d263 100644 --- a/DOCS/man/javascript.rst +++ b/DOCS/man/javascript.rst @@ -404,3 +404,6 @@ non-negligible duration to complete, so we re-calculate ``wait`` afterwards. ``mp.peek_timers_wait()`` returns the same values as ``mp.process_timers()`` but without doing anything. Invalid result if called from a timer callback. + +Note: ``exit()`` is also registered for the ``shutdown`` event, and its +implementation is a simple ``mp.keep_running = false``.