diff --git a/player/javascript/defaults.js b/player/javascript/defaults.js index 538f71cbe7..57e4b1646b 100644 --- a/player/javascript/defaults.js +++ b/player/javascript/defaults.js @@ -654,7 +654,7 @@ function register_event_handler(t) { mp.register_script_message("input-event", function (type, args) { if (t[type]) { args = args ? JSON.parse(args) : []; - var result = t[type](args[0], args[1]); + var result = t[type].apply(null, args); if (type == "complete" && result) { mp.commandv("script-message-to", "console", "complete",