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
[video][ios] Fix unable to call presentFullScreenPlayer twice #8343
Conversation
Fixes an issue when calling `presentFullScreenPlayer` more than once on iOS. This would result in the error “Fullscreen player is already being presented” when the `useNativeControls` prop also set on the `<Video>` component. When useNativeControls is set, it re-creates the PlayerViewController every time the full-screen view-controller was closed. This caused the “videoBounds” key-value handler to be called which incorrectly assumed the regular ViewController was transitioning from full-screen to non full-screen. An additional check has been added to ensure this detection is not triggered when the full-screen viewcontroll is used. When `useNativeControls` is set, calling `presentFullScreenPlayer` twice fails with
cc @FiberJW |
Thanks for this! I found one other issue with audio. I can make a snack if you’d like. Just haven’t had the time. It’s explained here though: https://stackoverflow.com/a/60152015/1487687 If you try ignoring the silent switch. It does not work with the video player UNLESS you turn auto play on. Very weird! P.S expo is awesome and I appreciate the quick turn around. 🙏🏻🙏🏻 |
You're welcome :D So please create a separate issue for the audio problem so we can keep the discussions on topic 👍 |
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.
💯 🎉 💯
@lukmccall If I merge this, would it correctly generate the CHANGELOG and what would that changelog entry be? |
@IjzerenHein, unfortunately, the danger is still in the test phase :/ So, you need to add it manually. You can see how it will look like her. It won't add anything to your code without your confirmation. Firstly, the script will generate a message with information about all missing entries - #8304 (comment). Then, it will create a new branch with data from the body of your PR. Where you can correct messages, just by adding a suggestion to generated code - #8306 (comment). I think it will be available after the coming release. Cause, I'm still working on fixing some issues with permissions on CI. |
@lukmccall No worries, looking forward to have this automated though 😃 |
) Fixes an issue when calling `presentFullScreenPlayer` more than once on iOS. This would result in the error “Fullscreen player is already being presented” when the `useNativeControls` prop also set on the `<Video>` component. When useNativeControls is set, it re-creates the PlayerViewController every time the full-screen view-controller was closed. This caused the “videoBounds” key-value handler to be called which incorrectly assumed the regular ViewController was transitioning from full-screen to non full-screen. An additional check has been added to ensure this detection is not triggered when the full-screen viewcontroller is used.
Why
Calling
presentFullScreenPlayer
on the Video component for the second time, throws error "Fullscreen player is already being presented". This happens only when theuseNativeControls
prop is also set.Fixes #8239
How
When useNativeControls is set, it re-creates the PlayerViewController every time the full-screen view-controller is closed. This in turn caused the “videoBounds” key observer handler to be called which incorrectly assumed the regular ViewController was transitioning from full-screen to non full-screen. An additional check has been added to ensure this detection is not triggered when the full-screen viewcontroller is used.
Test Plan
Steps to reproduce
Before
After