mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
command, lua: change script_message semantics
Change script_message to broadcast the message to all clients. Add a new script_message_to command, which does what the old script_message command did. This is intended as simplification, although it might lead to chaos too.
This commit is contained in:
@@ -168,7 +168,8 @@ const struct mp_cmd_def mp_cmds[] = {
|
||||
{ MP_CMD_VO_CMDLINE, "vo_cmdline", { ARG_STRING } },
|
||||
|
||||
{ MP_CMD_SCRIPT_DISPATCH, "script_dispatch", { ARG_STRING, ARG_INT } },
|
||||
{ MP_CMD_SCRIPT_MESSAGE, "script_message", { ARG_STRING, ARG_STRING },
|
||||
{ MP_CMD_SCRIPT_MESSAGE, "script_message", { ARG_STRING }, .vararg = true },
|
||||
{ MP_CMD_SCRIPT_MESSAGE_TO, "script_message_to", { ARG_STRING, ARG_STRING },
|
||||
.vararg = true },
|
||||
|
||||
{ MP_CMD_OVERLAY_ADD, "overlay_add",
|
||||
|
||||
@@ -101,6 +101,7 @@ enum mp_command_type {
|
||||
/// Internal for Lua scripts
|
||||
MP_CMD_SCRIPT_DISPATCH,
|
||||
MP_CMD_SCRIPT_MESSAGE,
|
||||
MP_CMD_SCRIPT_MESSAGE_TO,
|
||||
|
||||
MP_CMD_OVERLAY_ADD,
|
||||
MP_CMD_OVERLAY_REMOVE,
|
||||
|
||||
Reference in New Issue
Block a user