1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-24 07:42:17 +00:00
mpv/test/subtimes.js
Stefano Pigozzi cb32ad68f3 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.
2019-09-22 09:19:45 +02:00

8 lines
270 B
JavaScript

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);