I embedded an AVPlayerViewController inside of my ViewController like that:
avPlayerViewController.player = AVPlayer(url: viewModel.videoURL)
avPlayerViewController.delegate = self
addChild(avPlayerViewController)
view.addSubview(avPlayerViewController.view)
avPlayerViewController.view.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
avPlayerViewController.view.centerXAnchor.constraint(equalTo: videoContainerView.centerXAnchor),
avPlayerViewController.view.centerYAnchor.constraint(equalTo: videoContainerView.centerYAnchor),
avPlayerViewController.view.widthAnchor.constraint(equalTo: videoContainerView.widthAnchor),
avPlayerViewController.view.heightAnchor.constraint(equalTo: videoContainerView.heightAnchor)
])
avPlayerViewController.didMove(toParent: parent)
If video playback is runing I can open fullscreen mode (and leave it). But if I use pinch to zoom the running video, at the moment my fingers lift from screen I can see the running video zoom back to normal size and next all I can see is a black screen. I can still hear the audio from video playback, but no interaction is possible.
Xcode 11.2.1 gets used.
Any solution for this issue known?
Regards,
Kai