From 6c0a1733612f597088a55bfe023559dde1997a5c Mon Sep 17 00:00:00 2001 From: Ivan Schurawel <30599893+is343@users.noreply.github.com> Date: Fri, 10 Feb 2023 08:15:12 -0500 Subject: [PATCH] use whole subtitles element Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com> --- src/plugins/htmlVideoPlayer/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/htmlVideoPlayer/plugin.js b/src/plugins/htmlVideoPlayer/plugin.js index bfa74fb2c..ca07c2d7a 100644 --- a/src/plugins/htmlVideoPlayer/plugin.js +++ b/src/plugins/htmlVideoPlayer/plugin.js @@ -1342,7 +1342,7 @@ function tryRemoveElement(elem) { const subtitlesElement = document.createElement('div'); subtitlesElement.classList.add('videoSubtitlesInner'); subtitlesContainer.appendChild(subtitlesElement); - this.#videoSubtitlesElem = subtitlesContainer.querySelector('.videoSubtitlesInner'); + this.#videoSubtitlesElem = subtitlesElement; this.setSubtitleAppearance(subtitlesContainer, this.#videoSubtitlesElem); videoElement.parentNode.appendChild(subtitlesContainer); this.#currentTrackEvents = subtitleData.TrackEvents;