AVPlayer不播放视频

时间:2016-06-12 11:00:20

标签: swift parse-platform avplayer parse-server avplayerviewcontroller

我正在尝试从我的解析服务器播放视频我正在获取空视频播放器当我打印网址时,我得到了正确的视频网址

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()
            }

有任何帮助吗?从我的解析中播放视频。

0 个答案:

没有答案