Я использую HCVimeoVideoExtractor
. Иногда видео не загружаются. Почему видео загружается иногда, а не загружается в другое время. Я не понимаю, как это иногда может быть хорошо, а иногда нет.
//Getting url info for video by using exractor
func geturl() {
if let url = URL(string: calledVideo!) {
HCVimeoVideoExtractor.fetchVideoURLFrom(url: url, completion: { ( video:HCVimeoVideo?, error:Error?) -> Void in
if let err = error {
DispatchQueue.main.async() {
let alert = UIAlertController(title: "Error", message: err.localizedDescription, preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "OK", style: .default, handler: nil))
self.present(alert, animated: true, completion: nil)
}
return
}
guard let vid = video else {
print("Invalid video object")
return
}
//play video
//let player = AVPlayer(url: vid.videoURL[.Quality720p]!)
let player = AVPlayer(url: vid.videoURL[.Quality360p]!)
self.playerController.player = player
self.present(self.playerController, animated: true) {
player.play()
}
})
}
}
В меню ошибок появляется ошибка:
2020-02-03 20:51:38.804104+0000 josh[89837:1830383] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<NSLayoutConstraint:0x6000009b3200 UIImageView:0x7f981d50c5a0.height == 114.5 (active)>",
"<NSLayoutConstraint:0x6000009b3250 UIImageView:0x7f981d50c5a0.width == 1.51754*UIImageView:0x7f981d50c5a0.height (active)>",
"<NSLayoutConstraint:0x6000009b32a0 UIImageView:0x7f981d50c5a0.width == 173 (active)>"
)