Shaka Player UI shows wrong caption selection if TextTrackVisibility was changed after UI init #3728
Labels
flag: seeking PR
We are actively seeking PRs for this; we do not currently expect the core team will resolve this
priority: P2
Smaller impact or easy workaround
status: archived
Archived and locked; will not be updated
type: bug
Something isn't working correctly
Milestone
Have you read the FAQ and checked for duplicate open issues?
Yes.
What version of Shaka Player are you using?
3.2.1
Can you reproduce the issue with our latest release version?
Yes.
Can you reproduce the issue with the latest code from
master
?Considering the cause, probably could reproduce, but I didn't tried.
Are you using the demo app or your own custom app?
Custom app.
If custom app, can you reproduce the issue using our demo app?
Seems like there is no UI usage in the demo app.
What browser and OS are you using?
Chrome 95
What did you do?
setTextTrackVisibility(true);
setTextTrackVisibility(false);
)(if we click on "Captions", "English" is selected inside submenu)
What did you expect to happen?
"Captions Off" should be shown:
(if we click on "Captions", "Off" should be selected inside submenu)
Workaround
Change
setTextTrackVisibility(true);
before UI init (but that's not always possible).Cause
Current selection ("English", "Off", etc) seems to be updated inside
updateTextLanguages_
, but it's not called ontexttrackvisibility
event. OnlyonCaptionStateChange_
is called.I think adding call to
updateTextLanguages_
insideonCaptionStateChange_
will resolve the issue.I thought maybe we can just add
this.currentSelection.textContent = this.localization.resolve(shaka.ui.Locales.Ids.OFF);
toonCaptionStateChange_
, but that wouldn't update subtitles submenu.The text was updated successfully, but these errors were encountered: