鉴于确实加载了我正在加载的东西
let url = URL(string: url)
let asset = AVURLAsset(url: url!)
let item = AVPlayerItem(asset: asset)
self.player = AVPlayer(playerItem: item)
self.avpController.player = self.player
self.present(self.avpController, animated: true) {
self.avpController.player?.play()
}
唯一有意义的是url不好,但是它可以在浏览器(而不是野生动物园)和vlc播放器中工作:
任何想法都会有所帮助
答案 0 :(得分:0)
所以,一天之后,我设法做到了。 我使用了这个出色的指南来与vlc播放器一起玩:https://hackernoon.com/swift-4-ios-app-player-live-stream-video-from-nginx-nginx-rtmp-use-vlckit-f2162134ae5c