Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ADA-82): Caption Texts are Not Showing when Moving Cursor in Time Bar #738

Merged
merged 1 commit into from
Dec 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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