From 1e25b7f88dcc95997c8c741651599da0e9bdd39c Mon Sep 17 00:00:00 2001 From: Jacob Willden <67853915+jacob-willden@users.noreply.github.com> Date: Mon, 9 Dec 2024 03:40:04 -0700 Subject: [PATCH] Fix subtitlesMenu redeclaration in "Adding captions and subtitles to HTML video" tutorial (#37128) Fix subtitlesMenu reassignment Co-authored-by: Chris Mills --- .../adding_captions_and_subtitles_to_html5_video/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/media/audio_and_video_delivery/adding_captions_and_subtitles_to_html5_video/index.md b/files/en-us/web/media/audio_and_video_delivery/adding_captions_and_subtitles_to_html5_video/index.md index 01de51f52a17722..fa8195f5583298b 100644 --- a/files/en-us/web/media/audio_and_video_delivery/adding_captions_and_subtitles_to_html5_video/index.md +++ b/files/en-us/web/media/audio_and_video_delivery/adding_captions_and_subtitles_to_html5_video/index.md @@ -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++) {