Merge pull request #1827 from nfb-onf/fix-playerviewcontroller-keypath-leak
Fix playerviewcontroller keypath leak of observers
This commit is contained in:
commit
2c5006ac50
@ -1381,6 +1381,11 @@ static int const RCTVideoUnset = -1;
|
||||
{
|
||||
if (_playerViewController == playerViewController && _fullscreenPlayerPresented && self.onVideoFullscreenPlayerWillDismiss)
|
||||
{
|
||||
@try{
|
||||
[_playerViewController.contentOverlayView removeObserver:self forKeyPath:@"frame"];
|
||||
[_playerViewController removeObserver:self forKeyPath:readyForDisplayKeyPath];
|
||||
}@catch(id anException){
|
||||
}
|
||||
self.onVideoFullscreenPlayerWillDismiss(@{@"target": self.reactTag});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user