diff --git a/RCTVideo.m b/RCTVideo.m index 364560ed..7e48fb4d 100644 --- a/RCTVideo.m +++ b/RCTVideo.m @@ -227,7 +227,7 @@ static NSString *const playbackRate = @"rate"; _player.actionAtItemEnd = AVPlayerActionAtItemEndNone; if (_playbackRateObserverRegistered) { - [_player removeObserver:self forKeyPath:playbackRate]; + [_player removeObserver:self forKeyPath:playbackRate context:nil]; _playbackRateObserverRegistered = NO; } [_player addObserver:self forKeyPath:playbackRate options:0 context:nil]; @@ -676,7 +676,7 @@ static NSString *const playbackRate = @"rate"; { [_player pause]; if (_playbackRateObserverRegistered) { - [_player removeObserver:self forKeyPath:playbackRate]; + [_player removeObserver:self forKeyPath:playbackRate context:nil]; _playbackRateObserverRegistered = NO; } _player = nil;