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

fix: Prefer SimpleTextDisplayer on iOS #7569

Merged
merged 5 commits into from
Nov 13, 2024
Merged

Conversation

avelad
Copy link
Member

@avelad avelad commented Nov 12, 2024

Fixes #7568

@avelad avelad changed the title chore(Demo): Prefer SimpleTextDisplayer on iOS fix(Demo): Prefer SimpleTextDisplayer on iOS Nov 12, 2024
@avelad avelad added component: demo page The issue is in the demo page; does not affect production applications priority: P2 Smaller impact or easy workaround platform: iOS Issues affecting iOS component: captions/subtitles The issue involves captions or subtitles type: bug Something isn't working correctly labels Nov 12, 2024
@avelad avelad added this to the v4.12 milestone Nov 12, 2024
@avelad

This comment was marked as outdated.

@avelad avelad changed the title fix(Demo): Prefer SimpleTextDisplayer on iOS fix: Prefer SimpleTextDisplayer on iOS Nov 12, 2024
@avelad avelad removed the component: demo page The issue is in the demo page; does not affect production applications label Nov 12, 2024
@avelad avelad requested a review from tykus160 November 12, 2024 15:07
lib/text/ui_text_displayer.js Show resolved Hide resolved
lib/player.js Outdated Show resolved Hide resolved
lib/player.js Outdated
// On devices where the Fullscreen API is not available we prefer
// SimpleTextDisplayer because it works with the Fullscreen API of the
// video element itself.
if (this.videoContainer_ && document.fullscreenEnabled) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be a little more subtle. If you had a device without a fullscreen API of any kind, we would still want UITextDisplayer. The issue is that we end up on the WebKit-specific video-only fullscreen method, which breaks UITextDisplayer.

I think what we really want is something like this.videoContainer_ && (shouldUseDocumentFullscreen(this.config_) || !isFullScreenSupported()), where shouldUseDocumentFullscreen and isFullScreenSupported are extracted from ui/controls.js and made static.

Is this too subtle/complex?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I’ll do it tomorrow!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this only happens on iOS, I think I'll make a simpler version

@avelad avelad modified the milestones: v4.12, v4.13 Nov 13, 2024
@avelad avelad merged commit bd2c9a7 into shaka-project:main Nov 13, 2024
19 checks passed
@avelad avelad deleted the captions-ios branch November 13, 2024 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: captions/subtitles The issue involves captions or subtitles platform: iOS Issues affecting iOS priority: P2 Smaller impact or easy workaround type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No captions in fullscreen mode on iPhone (iOS) in Shaka demo
3 participants