mirror of
https://github.com/zoriya/react-native-video.git
synced 2026-08-16 02:56:22 +00:00
fix(ios): restore inline UI after PIP stop to prevent black screen (#4852)
* fix(ios): restore inline UI after PIP stop to prevent black screen * fix: restore pip when view is attached
This commit is contained in:
@@ -117,6 +117,14 @@ class VideoComponentViewObserver: NSObject, AVPlayerViewControllerDelegate {
|
||||
func playerViewControllerWillStopPictureInPicture(_: AVPlayerViewController) {
|
||||
delegate?.willExitPictureInPicture()
|
||||
}
|
||||
|
||||
func playerViewControllerRestoreUserInterfaceForPictureInPictureStop(
|
||||
_ playerViewController: AVPlayerViewController,
|
||||
completionHandler: @escaping (Bool) -> Void
|
||||
) {
|
||||
let isViewAttached = view?.window != nil
|
||||
completionHandler(isViewAttached)
|
||||
}
|
||||
|
||||
func playerViewController(
|
||||
_: AVPlayerViewController,
|
||||
|
||||
Reference in New Issue
Block a user