-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
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) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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
Fixes #7568