Commit 05139303 authored by David Peek's avatar David Peek
Browse files

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.
parent 69f4a35d
Loading
Loading
Loading
Loading
+3 −0
Changes for RCTVideo.m: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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