Search code examples
parse-platformavplayerparse-serveravplayerviewcontroller

AVPlayer doesn't play video from my parse


I'm trying to play video from my parse server I'm getting empty video player And when i print the url i get the correct video url

let thevideo:PFFile! = (self.selectedmsg["file"] as! PFFile)
            let url:NSURL = NSURL(string: thevideo.url!)!
            let player = AVPlayer(URL: url)

            let playercontroller = AVPlayerViewController()
            playercontroller.player = player

            self.presentViewController(playercontroller, animated: true) {

                player.play()
            }

Any help?


Solution

  • I had the same issue, tried to search around for solution, but cannot, the only workable solution is save the file to device, and play it locally.