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
[expo-av] Fix fullscreen events not emitted on iOS #9323
Conversation
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.
LGTM 👍 Definitely it's better to base on some actual callbacks than some by-hand-calculation when it comes to fullscreen detection 😉
@@ -52,7 +52,9 @@ export default class VideoPlayer extends React.Component< | |||
|
|||
_handleVideoMount = (ref: Video) => (this._video = ref); | |||
|
|||
_updateStateToStatus = (status: any) => this.setState(status); | |||
_handlePlaybackStatusUpdate = (status: any) => this.setState(status); |
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.
_handlePlaybackStatusUpdate = (status: any) => this.setState(status); | |
_handlePlaybackStatusUpdate = (status: SomeMeaningfulType) => this.setState(status); |
Maybe it would help understanding what state parameters are actually changing? 🤔
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.
Yeah I agree. I'll have at improving the example in a separate PR 👍
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.
NLC update PR #9335
* [ncl] Log full-screen events * [expo-av] Fix fullscreen events not emitted on iOS * [expo-av] Update changelog
Why
Fixes #8393. When using the native full-screen controls on iOS, the full-screen events are not (always) emitted.
How
As of iOS 12, full-screen detection can be achieved using the
AVPlayerViewControllerDelegate
delegate.AVPlayerViewControllerDelegate
methods for detecting the full-screen mode changeTest Plan
presentFullScreen..