diff --git a/src/player.js b/src/player.js index 879d47eae..1f08402ba 100644 --- a/src/player.js +++ b/src/player.js @@ -2287,7 +2287,18 @@ export default class Player extends FakeEventTarget { */ _onCueChange(event: FakeEvent): void { Player._logger.debug('Text cue changed', event.payload.cues); - this._activeTextCues = event.payload.cues; + //TODO: remove filter once FEC-11048 fix is done + try { + this._activeTextCues = event.payload.cues.filter((cue, index, cues) => { + const prevCue = cues[index - 1]; + if (!prevCue) { + return true; + } + return !(cue.startTime === prevCue.startTime && cue.endTime === prevCue.endTime && cue.text.trim() === prevCue.text.trim()); + }); + } catch (e) { + this._activeTextCues = event.payload.cues; + } this._updateCueDisplaySettings(); this._updateTextDisplay(this._activeTextCues); }