From bcecb6ed8116280be2ec2eeef3ecb5f417cef86a Mon Sep 17 00:00:00 2001 From: Baris Sencan Date: Fri, 26 Jun 2015 15:12:09 -0700 Subject: [PATCH] Set video gravity on main thread --- RCTVideo.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RCTVideo.m b/RCTVideo.m index 00ea810a..1ff98250 100644 --- a/RCTVideo.m +++ b/RCTVideo.m @@ -287,7 +287,9 @@ static NSString *const statusKeyPath = @"status"; - (void)setResizeMode:(NSString*)mode { _resizeMode = mode; - _playerLayer.videoGravity = mode; + dispatch_async(dispatch_get_main_queue(), ^{ + _playerLayer.videoGravity = mode; + }); } - (void)setPaused:(BOOL)paused