Skip to content

Commit

Permalink
DOCS/man/input: document that shutdown is sent when scripts terminate
Browse files Browse the repository at this point in the history
shutdown is not sent only when the player quits, but also when
individual script are unloaded, either by calling exit() or by toggling
options like --osc.

This was already mentioned in javascript.rst so remove it from there.
  • Loading branch information
guidocella authored and kasper93 committed Jan 31, 2025
1 parent cada717 commit 86383ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions DOCS/man/input.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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, and the script should terminate. Normally
handled automatically. See `Details on the script initialization and lifecycle`_.
Sent when the player quits or when a script terminates. 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:
Expand Down
3 changes: 0 additions & 3 deletions DOCS/man/javascript.rst
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,3 @@ 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``.

0 comments on commit 86383ae

Please sign in to comment.