AVPlayer not loading the video on swift tvOS

Viewed 16

I am playing a video from a server in my tvOS app, but it don't load its and keep a black screen.

If i change the url for a stock sample it load it.

I don't know if the problem is whit the app or the video file extension.

My code:

@IBAction func playButtonPressed(_ sender: Any) {

    //Whit this url works
    //let videoURL = URL(string: https://storage.googleapis.com/gvabox/media/samples/stock.mp4)
    let videoURL = URL(string: video.url!)
    let player = AVPlayer(url: videoURL!)
    let playerViewController = AVPlayerViewController()
    playerViewController.player = player
    
    self.present(playerViewController, animated: true) {
        playerViewController.player!.play()
    }
}

My video url is: https://edatv.isquad.video/vEmbed/8652

0 Answers
Related