fix(ios): crash on ads after leaving the app (#3911)
This commit is contained in:
parent
dc2a2ab863
commit
3d6bc9409c
@ -247,6 +247,11 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
|
||||
}
|
||||
|
||||
deinit {
|
||||
#if USE_GOOGLE_IMA
|
||||
_imaAdsManager.releaseAds()
|
||||
_imaAdsManager = nil
|
||||
#endif
|
||||
|
||||
NotificationCenter.default.removeObserver(self)
|
||||
self.removePlayerLayer()
|
||||
_playerObserver.clearPlayer()
|
||||
@ -1260,11 +1265,6 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
|
||||
_resouceLoaderDelegate = nil
|
||||
_playerObserver.clearPlayer()
|
||||
|
||||
#if USE_GOOGLE_IMA
|
||||
_imaAdsManager.releaseAds()
|
||||
_imaAdsManager = nil
|
||||
#endif
|
||||
|
||||
self.removePlayerLayer()
|
||||
|
||||
if let _playerViewController {
|
||||
|
Loading…
Reference in New Issue
Block a user