aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/static/js/transcript-table.js
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2020-12-15 12:30:46 -0500
committerJesús <heckyel@hyperbola.info>2020-12-15 12:30:46 -0500
commitf9461a2e79cd0be50937139eb9d0ad1a55e0578f (patch)
tree5b73b4e68349da83df4dd664728efe17ddbe048d /youtube/static/js/transcript-table.js
parenta6f21bbc6596a2e20e657dcecac0c64144c497d6 (diff)
downloadyt-local-f9461a2e79cd0be50937139eb9d0ad1a55e0578f.tar.lz
yt-local-f9461a2e79cd0be50937139eb9d0ad1a55e0578f.tar.xz
yt-local-f9461a2e79cd0be50937139eb9d0ad1a55e0578f.zip
Migration general theme: fix query video tag
Diffstat (limited to 'youtube/static/js/transcript-table.js')
-rw-r--r--youtube/static/js/transcript-table.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/youtube/static/js/transcript-table.js b/youtube/static/js/transcript-table.js
index 3f1f210..711dcb8 100644
--- a/youtube/static/js/transcript-table.js
+++ b/youtube/static/js/transcript-table.js
@@ -1,7 +1,7 @@
var details_tt, select_tt, table_tt;
function renderCues() {
- var selectedTrack = Q("video").textTracks[select_tt.selectedIndex];
+ var selectedTrack = QId("js-video-player").textTracks[select_tt.selectedIndex];
let cuesList = [...selectedTrack.cues];
var is_automatic = cuesList[0].text.startsWith(" \n");
@@ -38,7 +38,7 @@ function renderCues() {
a.href = "javascript:;"; // TODO: replace this with ?t parameter
if (title) a.title = title;
a.addEventListener("click", (e) => {
- Q("video").currentTime = startTime;
+ QId("js-video-player").currentTime = startTime;
})
return a;
}
@@ -92,7 +92,7 @@ function renderCues() {
}
function loadCues() {
- let textTracks = Q("video").textTracks;
+ let textTracks = QId("js-video-player").textTracks;
let selectedTrack = textTracks[select_tt.selectedIndex];
// See https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/mode
@@ -120,7 +120,7 @@ function loadCues() {
}
window.addEventListener('DOMContentLoaded', function() {
- let textTracks = Q("video").textTracks;
+ let textTracks = QId("js-video-player").textTracks;
if (!textTracks.length) return;
details_tt = Q("details#transcript-details");