summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2019-09-21 20:11:18 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2019-09-22 09:19:45 +0200
commitcb32ad68f31de784a13ca5a2847143c4c37738ce (patch)
tree9d9d5497c9a58d54ae5ef7cb226e81dd5fb14cb7 /test
parent0f938b197a79c09b01a9dcf39f02e95d9d7fb4a2 (diff)
downloadmpv-cb32ad68f31de784a13ca5a2847143c4c37738ce.tar.bz2
mpv-cb32ad68f31de784a13ca5a2847143c4c37738ce.tar.xz
command: add sub-start & sub-end properties
These properties contain the current subtitle's start and end times. Can be useful to cut sample audio through the scripting interface.
Diffstat (limited to 'test')
-rw-r--r--test/subtimes.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/subtimes.js b/test/subtimes.js
new file mode 100644
index 0000000000..7821e0b5c0
--- /dev/null
+++ b/test/subtimes.js
@@ -0,0 +1,7 @@
+function subtimes() {
+ mp.msg.info("sub-start: " + mp.get_property_number("sub-start"));
+ mp.msg.info("sub-end: " + mp.get_property_number("sub-end"));
+ mp.msg.info("sub-text: " + mp.get_property_native("sub-text"));
+}
+
+mp.add_key_binding("t", "subtimes", subtimes);