Set video gravity on main thread

This commit is contained in:
Baris Sencan 2015-06-26 15:12:09 -07:00
parent f83da614cf
commit bcecb6ed81

View File

@ -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