From cb32ad68f31de784a13ca5a2847143c4c37738ce Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 21 Sep 2019 20:11:18 +0200 Subject: 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. --- test/subtimes.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/subtimes.js (limited to 'test') 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); -- cgit v1.2.3