diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d43a044..7b52c98c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## Changelog +### Version 5.1.0-alpha6 + +- Fix iOS bug which would break size of views when video is displayed with controls on a non full-screen React view. [#1931](https://github.com/react-native-community/react-native-video/pull/1931) + ### Version 5.1.0-alpha5 - Add support for react-native Windows Cpp/WinRT [#1893]((https://github.com/react-native-community/react-native-video/pull/1893)) diff --git a/ios/Video/RCTVideo.m b/ios/Video/RCTVideo.m index 113d9f23..dde0dcb6 100644 --- a/ios/Video/RCTVideo.m +++ b/ios/Video/RCTVideo.m @@ -708,10 +708,10 @@ static int const RCTVideoUnset = -1; if (!CGRectEqualToRect(oldRect, newRect)) { if (CGRectEqualToRect(newRect, [UIScreen mainScreen].bounds)) { NSLog(@"in fullscreen"); - } else NSLog(@"not fullscreen"); - [self.reactViewController.view setFrame:[UIScreen mainScreen].bounds]; - [self.reactViewController.view setNeedsLayout]; + [self.reactViewController.view setFrame:[UIScreen mainScreen].bounds]; + [self.reactViewController.view setNeedsLayout]; + } else NSLog(@"not fullscreen"); } return;