使用 avkit 流式传输视频时黑屏
Black Screen when stream video with avkit
您好,我想在我的应用程序上流式传输远程视频。 URL 是: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()
}
AVPlayer 不支持 mkv 视频格式。
谁有播放所有视频格式的解决方案?
我已经测试了 MobileVLCKit 但它太重了 (1,5Go)...
您好,我想在我的应用程序上流式传输远程视频。 URL 是: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()
}
AVPlayer 不支持 mkv 视频格式。
谁有播放所有视频格式的解决方案?
我已经测试了 MobileVLCKit 但它太重了 (1,5Go)...