From a44ff111916e2eb58d16e3df13f1b46999ecabb4 Mon Sep 17 00:00:00 2001 From: Tuan Luong Date: Fri, 3 Jan 2020 09:35:40 +0700 Subject: [PATCH 1/2] update UIInterfaceOrientation in fullscreen --- ios/Video/RCTVideoPlayerViewController.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ios/Video/RCTVideoPlayerViewController.m b/ios/Video/RCTVideoPlayerViewController.m index 548a06ceee..acac495237 100644 --- a/ios/Video/RCTVideoPlayerViewController.m +++ b/ios/Video/RCTVideoPlayerViewController.m @@ -28,7 +28,8 @@ - (UIInterfaceOrientationMask)supportedInterfaceOrientations { - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { if ([self.preferredOrientation.lowercaseString isEqualToString:@"landscape"]) { - return UIInterfaceOrientationLandscapeRight; + UIDeviceOrientation currentOrientation = [[UIDevice currentDevice] orientation]; + return currentOrientation == UIDeviceOrientationLandscapeRight ? UIInterfaceOrientationLandscapeLeft : UIInterfaceOrientationLandscapeRight; } else if ([self.preferredOrientation.lowercaseString isEqualToString:@"portrait"]) { return UIInterfaceOrientationPortrait; From 84aedaca81b58c3d4f541ccfe7bea8aaf4214a8c Mon Sep 17 00:00:00 2001 From: Tuan Luong Date: Thu, 7 May 2020 16:52:54 +0700 Subject: [PATCH 2/2] update code --- ios/Video/RCTVideoPlayerViewController.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ios/Video/RCTVideoPlayerViewController.m b/ios/Video/RCTVideoPlayerViewController.m index acac495237..8319f6d859 100644 --- a/ios/Video/RCTVideoPlayerViewController.m +++ b/ios/Video/RCTVideoPlayerViewController.m @@ -28,8 +28,7 @@ - (UIInterfaceOrientationMask)supportedInterfaceOrientations { - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { if ([self.preferredOrientation.lowercaseString isEqualToString:@"landscape"]) { - UIDeviceOrientation currentOrientation = [[UIDevice currentDevice] orientation]; - return currentOrientation == UIDeviceOrientationLandscapeRight ? UIInterfaceOrientationLandscapeLeft : UIInterfaceOrientationLandscapeRight; + return UIInterfaceOrientationLandscapeLeft | UIInterfaceOrientationLandscapeRight; } else if ([self.preferredOrientation.lowercaseString isEqualToString:@"portrait"]) { return UIInterfaceOrientationPortrait;