Skip to content

Commit

Permalink
Fix subtitlesMenu redeclaration in "Adding captions and subtitles to …
Browse files Browse the repository at this point in the history
…HTML video" tutorial (#37128)

Fix subtitlesMenu reassignment

Co-authored-by: Chris Mills <[email protected]>
  • Loading branch information
jacob-willden and chrisdavidmills authored Dec 9, 2024
1 parent 934dace commit 1e25b7f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ All we need to do is to go through the video's `textTracks`, reading their prope
let subtitlesMenu;
if (video.textTracks) {
const df = document.createDocumentFragment();
const subtitlesMenu = df.appendChild(document.createElement("ul"));
subtitlesMenu = df.appendChild(document.createElement("ul"));
subtitlesMenu.className = "subtitles-menu";
subtitlesMenu.appendChild(createMenuItem("subtitles-off", "", "Off"));
for (let i = 0; i < video.textTracks.length; i++) {
Expand Down

0 comments on commit 1e25b7f

Please sign in to comment.