Unverified Commit 3d40935c authored by Hampton Maxwell's avatar Hampton Maxwell Committed by GitHub
Browse files

Revert crash fix when removing player layer observer

Couldn't figure out how this was happening, so I don't want to hide it with try/catch. Let's get it fixed instead.
parent 80b71b19
Loading
Loading
Loading
Loading
+0 −6
Changes for ios/RCTVideo.m: 0 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -732,10 +732,7 @@ static NSString *const timedMetadata = @"timedMetadata";
- (void)removePlayerLayer
{
    [_playerLayer removeFromSuperlayer];
    @try{
    [_playerLayer removeObserver:self forKeyPath:readyForDisplayKeyPath];
    }@catch (NSException * e) {
    }
    _playerLayer = nil;
}

@@ -826,10 +823,7 @@ static NSString *const timedMetadata = @"timedMetadata";
{
  [_player pause];
  if (_playbackRateObserverRegistered) {
    @try{
    [_player removeObserver:self forKeyPath:playbackRate context:nil];
    }@catch (NSException * e) {
    }
    _playbackRateObserverRegistered = NO;
  }
  _player = nil;