嗨,我想在我的应用程序上播放远程视频。网址为:http://test.ext/myvideo.mkv
我使用的AVKit与此代码,但屏幕和音频不工作。我只看到前进的进度条。
let player = AVPlayer(url: url)
// Create a new AVPlayerViewController and pass it a reference to the player.
let controller = AVPlayerViewController()
controller.player = player
controller.player?.automaticallyWaitsToMinimizeStalling = false
controller.player?.playImmediately(atRate: 1.0)
// Modally present the player and call the player's play() method when complete.
self.present(controller, animated: true) {
player.play()
}发布于 2020-04-09 08:09:52
AVPlayer不支持mkv视频格式。
谁有播放所有视频格式的解决方案?
我测试过MobileVLCKit,但它太重了(1,5Go)……
https://stackoverflow.com/questions/60641956
复制相似问题