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

1319 - fullscreen rotation issues with iOS built-in controls #1441

Merged

Conversation

ashnfb
Copy link
Contributor

@ashnfb ashnfb commented Jan 22, 2019

EXAMPLE TO TEST

Use the embed-and-fullscreen example project included

CHANGE DESCRIPTION

There are 2 different methods for rendering video: AVPlayerLayer (doesn't have built-in controls), and an embedded AVPlayerViewController (used when built-in controls are on). The problem is when AVPlayerViewController is in fullscreen and a rotation occurs, the "onLayout" is never sent to react-native's shadowViews.

The solution is to force the reactViewController.view (the rootViewController) to update it's bounds to the rotated screen's bounds and mark the view as needing layout. This causes the right sequence of events -- ie. react-native calls onLayout correctly and layouts out all other subviews.

@ashnfb ashnfb force-pushed the 1319-fullscreen-rotation-issues branch 2 times, most recently from 7569ec0 to 315939d Compare January 25, 2019 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants