summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorAvi Halachmi (:avih) <avihpit@yahoo.com>2020-03-07 12:00:33 +0200
committerAvi Halachmi (:avih) <avihpit@yahoo.com>2020-03-07 12:37:35 +0200
commit9cf45d8300b4e89927e61af9e4a9381cc3d75078 (patch)
tree6a1e6e3bb43af4c5b011b2bb2a427a25b7318882 /audio
parentba70b150fbe89c00e4ef7dcb975ec695b49dac8d (diff)
downloadmpv-9cf45d8300b4e89927e61af9e4a9381cc3d75078.tar.bz2
mpv-9cf45d8300b4e89927e61af9e4a9381cc3d75078.tar.xz
js: osd-overlay update: support arbitrary key names
Until now the 'update' method used mp.command_native with a hardcoded list of key names. Change it to use whatever keys the user set to this object, so that we can remain oblivious to new keys which 'osd-overlay' may support. This is how the lua code did it from the begining. We didn't, and now we pay the price. Note: could be implemented either as we have now (clone `this` excluding the methods) or by moving the methods up the prototype chain (i.e. class methods) so they don't get enumerated and use `this` as the command object itself. However, in the latter approach we'll have to save the values which we change (name, res_x, res_y) and restore them after the command, so it's simpler to just clone `this`.
Diffstat (limited to 'audio')
0 files changed, 0 insertions, 0 deletions