diff options
Diffstat (limited to 'player/lua.c')
-rw-r--r-- | player/lua.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/player/lua.c b/player/lua.c index edd01c0c73..826de209ed 100644 --- a/player/lua.c +++ b/player/lua.c @@ -442,6 +442,22 @@ static int script_wait_event(lua_State *L) lua_setfield(L, -2, "args"); // event break; } + case MPV_EVENT_PAUSE: + case MPV_EVENT_UNPAUSE: + { + mpv_event_pause_reason *msg = event->data; + lua_pushboolean(L, msg->real_paused); + lua_setfield(L, -2, "real_paused"); + lua_pushboolean(L, msg->user_paused); + lua_setfield(L, -2, "user_paused"); + lua_pushboolean(L, msg->by_command); + lua_setfield(L, -2, "by_command"); + lua_pushboolean(L, msg->by_cache); + lua_setfield(L, -2, "by_cache"); + lua_pushboolean(L, msg->by_keep_open); + lua_setfield(L, -2, "by_keep_open"); + break; + } default: ; } |