From 08c7aaa77e660129041b488e4448b884e3d63ad3 Mon Sep 17 00:00:00 2001 From: Jens Andersson Date: Tue, 5 May 2020 18:10:49 +0200 Subject: [PATCH] Compare CGFloats instead --- ios/Video/RCTVideo.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Video/RCTVideo.m b/ios/Video/RCTVideo.m index c6113cad..e9c49b91 100644 --- a/ios/Video/RCTVideo.m +++ b/ios/Video/RCTVideo.m @@ -641,7 +641,7 @@ static int const RCTVideoUnset = -1; } else if (_playerItem.presentationSize.height) { width = [NSNumber numberWithFloat:_playerItem.presentationSize.width]; height = [NSNumber numberWithFloat:_playerItem.presentationSize.height]; - orientation = width > height ? @"landscape" : @"portrait"; + orientation = _playerItem.presentationSize.width > _playerItem.presentationSize.height ? @"landscape" : @"portrait"; } if (self.onVideoLoad && _videoLoadStarted) {