Skip to content

Commit

Permalink
fix(ADA-82): Caption Texts are Not Showing when Moving Cursor in Time…
Browse files Browse the repository at this point in the history
… Bar (#738)

issue:
In Edge browser when video is paused and captions enabled, when seeking in seekbar the caption are not displayed on the player.

solution:
The issue is caused by old fix made here - #147 The original issue no longer reproducible so removed the old patch.

solves ADA-82
  • Loading branch information
Tzipi-kaltura authored Dec 4, 2023
1 parent e413c40 commit 005b774
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -1941,12 +1941,6 @@ export default class Player extends FakeEventTarget {
this._isOnLiveEdge = this.duration && this.currentTime ? this.currentTime >= this.duration - LIVE_EDGE_THRESHOLD && !this.paused : false;
}
});
this._eventManager.listen(this._engine, Html5EventType.SEEKED, () => {
const browser = this._env.browser.name;
if (browser === 'Edge' || browser === 'IE') {
this._removeTextCuePatch();
}
});
this._eventManager.listen(this._engine, CustomEventType.MEDIA_RECOVERED, (event: FakeEvent) => this.dispatchEvent(event));
this._eventManager.listen(this._engine, CustomEventType.IMAGE_TRACK_CHANGED, (event: FakeEvent) => this.dispatchEvent(event));
this._eventManager.listen(this._engine, CustomEventType.TEXT_TRACK_ADDED, (event: FakeEvent) => this.dispatchEvent(event));
Expand Down Expand Up @@ -2054,24 +2048,6 @@ export default class Player extends FakeEventTarget {
this._updateTextDisplay(this._activeTextCues);
}
/**
* Handles the cue text removal issue, when seeking to a time without captions in IE \ edge the previous captions
* are not removed
* @returns {void}
* @private
*/
_removeTextCuePatch(): void {
let filteredActiveTextCues = this._activeTextCues.filter(textCue => {
const cueEndTime = textCue._endTime;
const cueStartTime = textCue._startTime;
const currTime = this.currentTime;
if (currTime < cueEndTime && currTime > cueStartTime) {
return textCue;
}
});
this._updateTextDisplay(filteredActiveTextCues);
}
/**
* Handles the playback options, from current state or config.
* @returns {void}
Expand Down

0 comments on commit 005b774

Please sign in to comment.