diff --git a/src/plugins/htmlVideoPlayer/plugin.js b/src/plugins/htmlVideoPlayer/plugin.js index 7df882fceb..b8903ee326 100644 --- a/src/plugins/htmlVideoPlayer/plugin.js +++ b/src/plugins/htmlVideoPlayer/plugin.js @@ -581,7 +581,9 @@ function tryRemoveElement(elem) { const trackElements = this.getTextTracks(); // if .vtt currently rendering if (trackElements.length > 0) { - trackElements.forEach((trackElement, index) => this.setTextTrackSubtitleOffset(trackElement, offsetValue, index)); + trackElements.forEach(function (trackElement, index) { + this.setTextTrackSubtitleOffset(trackElement, offsetValue, index); + }); } else if (this.#currentTrackEvents || this.#currentSecondaryTrackEvents) { this.#currentTrackEvents && this.setTrackEventsSubtitleOffset(this.#currentTrackEvents, offsetValue, PRIMARY_TEXT_TRACK_INDEX); this.#currentSecondaryTrackEvents && this.setTrackEventsSubtitleOffset(this.#currentSecondaryTrackEvents, offsetValue, SECONDARY_TEXT_TRACK_INDEX);