mirror of
https://github.com/mpv-player/mpv
synced 2024-12-27 17:42:17 +00:00
34cfe9d89b
Adds secondary-sub-start and secondary-sub-end properties by setting the current_track index in the m_property's priv variable which later gets accessed in get_times. Also adds a test of the secondary subtitle time properties in tests/subtimes.js bound to 'T'.
15 lines
630 B
JavaScript
15 lines
630 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);
|
|
|
|
function secondary_subtimes() {
|
|
mp.msg.info("secondary-sub-start: " + mp.get_property_number("secondary-sub-start"));
|
|
mp.msg.info("secondary-sub-end: " + mp.get_property_number("secondary-sub-end"));
|
|
mp.msg.info("secondary-sub-text: " + mp.get_property_native("secondary-sub-text"));
|
|
}
|
|
|
|
mp.add_key_binding("T", "secondary_subtimes", secondary_subtimes); |