summaryrefslogtreecommitdiffstats
path: root/test/subtimes.js
diff options
context:
space:
mode:
authorRipose <ripose@protonmail.com>2021-07-12 11:29:59 -0700
committerDudemanguy <random342@airmail.cc>2021-07-12 21:07:37 +0000
commit34cfe9d89b19b3080bf62168803a8cb239c03c4c (patch)
tree9746f03fd0300180521c39b75e792bf47ed3c959 /test/subtimes.js
parent383acd41a8d8f0620b0bf20bb2be23d629d67285 (diff)
downloadmpv-34cfe9d89b19b3080bf62168803a8cb239c03c4c.tar.bz2
mpv-34cfe9d89b19b3080bf62168803a8cb239c03c4c.tar.xz
command: add secondary-sub-start and secondary-sub-end properties
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'.
Diffstat (limited to 'test/subtimes.js')
-rw-r--r--test/subtimes.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/subtimes.js b/test/subtimes.js
index 7821e0b5c0..be6940ad3b 100644
--- a/test/subtimes.js
+++ b/test/subtimes.js
@@ -5,3 +5,11 @@ function subtimes() {
}
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); \ No newline at end of file