Disables default system animation when resizing AVPlayerLayer

Not sure if this something you will want – perhaps it could go behind a flag. When animating video size, the default system animation makes the rendered size of the video lag behind the bounds of the react view. This patch disables the default animation, ensuring the video renders at the correct size.
This commit is contained in:
David Peek 2015-07-14 16:35:29 +01:00
parent 69f4a35de7
commit 0513930399

View File

@ -405,7 +405,10 @@ static NSString *const statusKeyPath = @"status";
- (void)layoutSubviews
{
[super layoutSubviews];
[CATransaction begin];
[CATransaction setAnimationDuration:0];
_playerLayer.frame = self.bounds;
[CATransaction commit];
}
#pragma mark - Lifecycle