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

Caption can not turn off at iOS Safari #4940

Closed
cuyl opened this issue Jan 29, 2023 · 0 comments · Fixed by #4978
Closed

Caption can not turn off at iOS Safari #4940

cuyl opened this issue Jan 29, 2023 · 0 comments · Fixed by #4978
Assignees
Labels
component: captions/subtitles The issue involves captions or subtitles platform: iOS Issues affecting iOS 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

@cuyl
Copy link
Contributor

cuyl commented Jan 29, 2023

Have you read the FAQ and checked for duplicate open issues?
Yes

What version of Shaka Player are you using?
4.3.3

Can you reproduce the issue with our latest release version?
yes

Can you reproduce the issue with the latest code from main?
yes

Are you using the demo app or your own custom app?

https://shaka-player-demo.appspot.com/demo/#audiolang=en-US;textlang=en-US;uilang=en-US;asset=https://storage.googleapis.com/shaka-demo-assets/angel-one-hls/hls.m3u8;panel=ALL_CONTENT;panelData=HLS,SUBTITLES;build=uncompiled

What browser and OS are you using?

iOS Safari

For embedded devices (smart TVs, etc.), what model and firmware version are you using?

What are the manifest and license server URIs?

What configuration are you using? What is the output of player.getConfiguration()?
autoShowText: ' ALWAYS'

What did you do?
Open a HLS with Subtitles in iOS safari browser.
When the Caption turned on initially it can not turn off.
After switch to another language, it can be turn off.

What did you expect to happen?
Caption can turn off.

What actually happened?

I found that player.setTextTrackVisibility(false) is not working in this case.
player.isTextVisible_ is false but it should be true.

shaka-player/lib/player.js

Lines 4429 to 4436 in 67a2451

setTextTrackVisibility(isVisible) {
const oldVisibilty = this.isTextVisible_;
// Convert to boolean in case apps pass 0/1 instead false/true.
const newVisibility = !!isVisible;
if (oldVisibilty == newVisibility) {
return;
}

@cuyl cuyl added the type: bug Something isn't working correctly label Jan 29, 2023
@github-actions github-actions bot added this to the v4.4 milestone Jan 29, 2023
@avelad avelad added component: captions/subtitles The issue involves captions or subtitles platform: iOS Issues affecting iOS labels Feb 7, 2023
@avelad avelad self-assigned this Feb 8, 2023
@avelad avelad added the priority: P2 Smaller impact or easy workaround label Feb 8, 2023
theodab pushed a commit that referenced this issue Feb 8, 2023
Fixes #4940

This occurs when the operating system defaults to enabled subtitles in
src= mode. The solution is to detect that there are active subtitles and
set the internal visible flag to true.
joeyparrish pushed a commit that referenced this issue Feb 9, 2023
Fixes #4940

This occurs when the operating system defaults to enabled subtitles in
src= mode. The solution is to detect that there are active subtitles and
set the internal visible flag to true.
joeyparrish pushed a commit that referenced this issue Feb 9, 2023
Fixes #4940

This occurs when the operating system defaults to enabled subtitles in
src= mode. The solution is to detect that there are active subtitles and
set the internal visible flag to true.
joeyparrish pushed a commit that referenced this issue Feb 9, 2023
Fixes #4940

This occurs when the operating system defaults to enabled subtitles in
src= mode. The solution is to detect that there are active subtitles and
set the internal visible flag to true.
joeyparrish pushed a commit that referenced this issue Feb 9, 2023
Fixes #4940

This occurs when the operating system defaults to enabled subtitles in
src= mode. The solution is to detect that there are active subtitles and
set the internal visible flag to true.
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Apr 10, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: captions/subtitles The issue involves captions or subtitles platform: iOS Issues affecting iOS 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
Development

Successfully merging a pull request may close this issue.

2 participants