From f9461a2e79cd0be50937139eb9d0ad1a55e0578f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Tue, 15 Dec 2020 12:30:46 -0500 Subject: Migration general theme: fix query video tag --- youtube/static/js/transcript-table.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'youtube/static/js/transcript-table.js') 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"); -- cgit v1.2.3