With minor difference from lua, as documented.
Showing the changes to player/javascript.c (1 of 3 files). Show all
Unified · Split
| @@ -718,6 +718,13 @@ static void script__command_native_async(js_State *J, void *af) · 717 unmodified lines | |||
| 718 | push_status(J, mpv_command_node_async(jclient(J), id, &node)); | 718 | push_status(J, mpv_command_node_async(jclient(J), id, &node)); |
| 719 | } | 719 | } |
| 720 | 720 | ||
| 721 | // args: async-command-id | ||
| 722 | static void script__abort_async_command(js_State *J) | ||
| 723 | { | ||
| 724 | mpv_abort_async_command(jclient(J), jsL_checkuint64(J, 1)); | ||
| 725 | push_success(J); | ||
| 726 | } | ||
| 727 | |||
| 721 | // args: none, result in millisec | 728 | // args: none, result in millisec |
| 722 | static void script_get_time_ms(js_State *J) | 729 | static void script_get_time_ms(js_State *J) |
| 723 | { | 730 | { |
| @@ -1232,6 +1239,7 @@ static const struct fn_entry main_fns[] = { · 508 unmodified lines | |||
| 1232 | FN_ENTRY(commandv, 0), | 1239 | FN_ENTRY(commandv, 0), |
| 1233 | AF_ENTRY(command_native, 2), | 1240 | AF_ENTRY(command_native, 2), |
| 1234 | AF_ENTRY(_command_native_async, 2), | 1241 | AF_ENTRY(_command_native_async, 2), |
| 1242 | FN_ENTRY(_abort_async_command, 1), | ||
| 1235 | FN_ENTRY(get_property_bool, 2), | 1243 | FN_ENTRY(get_property_bool, 2), |
| 1236 | FN_ENTRY(get_property_number, 2), | 1244 | FN_ENTRY(get_property_number, 2), |
| 1237 | AF_ENTRY(get_property_native, 2), | 1245 | AF_ENTRY(get_property_native, 2), |