Skip to content

Commit

Permalink
fix(SUP-39574): Enable captions button is not working (#725)
Browse files Browse the repository at this point in the history
the issue:
when the textLanguage config is defined to "auto" and there is no previous language in the localSession when clicking on enable caption button nothing happen.

root cause:
trying to find track with "auto" language and not real language

the solution:
when "captionsDisplay" is disabled change the attribute state to defaultLanguage (the playbackConfig.textLanguage after set the language for "auto")
  • Loading branch information
Tzipi-kaltura authored Oct 24, 2023
1 parent b0adedc commit 1f66b30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -2611,7 +2611,7 @@ export default class Player extends FakeEventTarget {
this._playbackAttributesState.audioLanguage ||
this._getLanguage<AudioTrack>(this._getAudioTracks(), playbackConfig.audioLanguage, activeTracks.audio);
if (!playbackConfig.captionsDisplay) {
this._playbackAttributesState.textLanguage = playbackConfig.textLanguage;
this._playbackAttributesState.textLanguage = defaultLanguage;
this._setDefaultTrack<TextTrack>(this._getTextTracks(), OFF, offTextTrack);
} else {
if (currentOrConfiguredTextLang === playbackConfig.textLanguage) {
Expand Down

0 comments on commit 1f66b30

Please sign in to comment.