Я бы хотел передавать потоковое видео непосредственно из Firebase Storage, а не загружать каждое видео на клиент.
Однако мое видео не воспроизводится.Он показывает только черный экран.Правильно ли отформатирована моя URL-ссылка?
class NewsfeedTableViewController: UITableViewController {
var playerController = AVPlayerViewController()
var player: AVPlayer?
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
{
let newMedia = media[indexPath.section - 1]
if let videoString = newMedia.videoLink {
let finalString = "\(videoString).MOV"
print("finalString is \(finalString)")
// prints out finalString is https://firebasestorage.googleapis.com/v0/b/mystreet-c8434.appspot.com/o/newsfeedVideos%2F-LMrZEMmzoasmyUXW_Yh?alt=media&token=1cb3df0d-3aa6-4947-abc8-93fd6eada953.MOV
let videoURL = NSURL(string: finalString)
self.player = AVPlayer(url: videoURL as! URL)
self.playerController.player = self.player
self.present(playerController, animated: true) {
self.playerController.player?.play()
}
}
}
}