diff options
Diffstat (limited to 'youtube/static/js')
-rw-r--r-- | youtube/static/js/transcript-table.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/youtube/static/js/transcript-table.js b/youtube/static/js/transcript-table.js index 6b57911..ac81444 100644 --- a/youtube/static/js/transcript-table.js +++ b/youtube/static/js/transcript-table.js @@ -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) { |