transcript-table.js: sync active transcript with select_tt

This commit is contained in:
zrose584 2020-09-12 10:23:31 +02:00
parent 081058c07e
commit 537a8e8ab5

View File

@ -56,8 +56,12 @@ function renderCues() {
function loadCues() {
let tts = Q("video").textTracks;
let tt = tts[select_tt.selectedIndex];
for (let ttI of tts) if (ttI !== tt) ttI.mode = "disabled";
if (tt.mode == "disabled") tt.mode = "hidden";
let dst_mode = "hidden";
for (let ttI of tts) {
if (ttI.mode === "showing") dst_mode = "showing";
if (ttI !== tt) ttI.mode = "disabled";
}
if (tt.mode == "disabled") tt.mode = dst_mode;
var iC = setInterval(() => {
if (tt.cues && tt.cues.length) {