Merge branch 'master' into chore/fix_fullscreen_btn_when_already_in_fullscreen
This commit is contained in:
commit
908dcb147b
@ -10,6 +10,7 @@
|
|||||||
- Fix iOS RCTSwiftLog naming collision [#2868](https://github.com/react-native-video/react-native-video/issues/2868)
|
- Fix iOS RCTSwiftLog naming collision [#2868](https://github.com/react-native-video/react-native-video/issues/2868)
|
||||||
- Added "homepage" to package.json [#2882](https://github.com/react-native-video/react-native-video/pull/2882)
|
- Added "homepage" to package.json [#2882](https://github.com/react-native-video/react-native-video/pull/2882)
|
||||||
- Fix regression when fullscreen prop is used combined with controls [#2911](https://github.com/react-native-video/react-native-video/pull/2911)
|
- Fix regression when fullscreen prop is used combined with controls [#2911](https://github.com/react-native-video/react-native-video/pull/2911)
|
||||||
|
- Fix: memory leak issue on iOS [#2907](https://github.com/react-native-video/react-native-video/pull/2907)
|
||||||
|
|
||||||
### Version 6.0.0-alpha.3
|
### Version 6.0.0-alpha.3
|
||||||
|
|
||||||
|
@ -280,7 +280,7 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
|
|||||||
self._playerItem?.preferredPeakBitRate = Double(maxBitRate)
|
self._playerItem?.preferredPeakBitRate = Double(maxBitRate)
|
||||||
}
|
}
|
||||||
|
|
||||||
self._player = AVPlayer()
|
self._player = self._player ?? AVPlayer()
|
||||||
DispatchQueue.global(qos: .default).async {
|
DispatchQueue.global(qos: .default).async {
|
||||||
self._player?.replaceCurrentItem(with: playerItem)
|
self._player?.replaceCurrentItem(with: playerItem)
|
||||||
}
|
}
|
||||||
@ -704,6 +704,7 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
_playerViewController?.view.removeFromSuperview()
|
_playerViewController?.view.removeFromSuperview()
|
||||||
|
_playerViewController?.removeFromParent()
|
||||||
_playerViewController = nil
|
_playerViewController = nil
|
||||||
_playerObserver.playerViewController = nil
|
_playerObserver.playerViewController = nil
|
||||||
self.usePlayerLayer()
|
self.usePlayerLayer()
|
||||||
@ -836,6 +837,7 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
|
|||||||
|
|
||||||
if let _playerViewController = _playerViewController {
|
if let _playerViewController = _playerViewController {
|
||||||
_playerViewController.view.removeFromSuperview()
|
_playerViewController.view.removeFromSuperview()
|
||||||
|
_playerViewController.removeFromParent()
|
||||||
_playerViewController.rctDelegate = nil
|
_playerViewController.rctDelegate = nil
|
||||||
_playerViewController.player = nil
|
_playerViewController.player = nil
|
||||||
self._playerViewController = nil
|
self._playerViewController = nil
|
||||||
|
Loading…
Reference in New Issue
Block a user