Skip to content

Commit

Permalink
fix(FEC-14257): Fix duplicating captions on Safari (#806)
Browse files Browse the repository at this point in the history
### Description of the Changes

Fixes issue on https://kaltura.atlassian.net/browse/FEC-14257

### CheckLists

- [ ] changes have been done against master branch, and PR does not
conflict
- [ ] new unit / functional tests have been added (whenever applicable)
- [ ] test are passing in local environment
- [ ] Travis tests are passing (or test results are not worse than on
master branch :))
- [ ] Docs have been updated

Co-authored-by: quantumInverter <[email protected]>
  • Loading branch information
DanilMolchanovKaltura and quantumInverter authored Jan 20, 2025
1 parent 468c8ff commit 2bf8729
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2616,10 +2616,10 @@ export default class Player extends FakeEventTarget {
* @returns {void}
*/
private _updateTextDisplay(cues: Array<VTTCue>): void {
if (this._config.text.useShakaTextTrackDisplay) {
if (this._config.text.useShakaTextTrackDisplay && !(this._config.text.useNativeTextTrack || this._config.text.enableCEA708Captions)) {
this._applyCustomSubtitleStyles();
}
if (!this._config.text.useNativeTextTrack && !this._config.text.useShakaTextTrackDisplay) {
if (!this._config.text.useNativeTextTrack && !this._config.text.useShakaTextTrackDisplay && !this._config.text.enableCEA708Captions) {
processCues(window, cues, this._textDisplayEl, this._textStyle);
}
}
Expand Down

0 comments on commit 2bf8729

Please sign in to comment.