Это мой код AVPlayer:
let video = AVPlayer(url: URL(string: "MY_URL_VIDEO")!)
let videoPlayer = AVPlayerViewController()
videoPlayer.player = video
present(videoPlayer, animated: true, completion: {
video.play()
})
А это мой код UIAlertController:
let ac = UIAlertController(title: "Select", message: nil, preferredStyle: .actionSheet)
ac.addAction(UIAlertAction(title: "Full HD 1080p", style: .default, handler: video.play()))
ac.addAction(UIAlertAction(title: "cancel", style: .cancel))
ac.popoverPresentationController?.barButtonItem = self.navigationItem.rightBarButtonItem
present(ac, animated: true)
А вот и моя ошибка: (
![enter image description here](https://i.stack.imgur.com/k2Sho.png)