Navigation Menu

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

Shaka Player UI shows wrong caption selection if TextTrackVisibility was changed after UI init #3728

Closed
Dador opened this issue Oct 31, 2021 · 2 comments · Fixed by #3867 or #4009
Closed
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

Comments

@Dador
Copy link
Contributor

Dador commented Oct 31, 2021

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?

  • Init player with setTextTrackVisibility(true);
  • Init UI
  • Disable captions (change to setTextTrackVisibility(false);)
  • "Captions" icon becomes gray, but still shows selected language ("English" in this case) instead of "Off"

image
(if we click on "Captions", "English" is selected inside submenu)

What did you expect to happen?
"Captions Off" should be shown:
image
(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 on texttrackvisibility event. Only onCaptionStateChange_ is called.

I think adding call to updateTextLanguages_ inside onCaptionStateChange_ will resolve the issue.
I thought maybe we can just add this.currentSelection.textContent = this.localization.resolve(shaka.ui.Locales.Ids.OFF); to onCaptionStateChange_, but that wouldn't update subtitles submenu.

@Dador Dador added the type: bug Something isn't working correctly label Oct 31, 2021
@shaka-bot shaka-bot added this to the v3.3 milestone Oct 31, 2021
@joeyparrish joeyparrish added 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 labels Nov 2, 2021
@joeyparrish
Copy link
Member

Thank you for the detailed report! Would you be interesting in sending a PR for this?

@Dador
Copy link
Contributor Author

Dador commented Nov 3, 2021

I can do it if it's necessary. My dev env is not ready for shaka player, so I actually prefer if you can just commit it.

@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Mar 19, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 19, 2022
@avelad avelad modified the milestones: v3.3, v4.0 May 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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
Projects
None yet
4 participants