我正在构建一个广播/播客流媒体应用程序,并在输出终端中收到以下注释。我一直忽略它,因为它似乎没有任何影响,但现在它似乎正在影响我使用 UISlider 作为搜索栏以在轨道中跳得更远或更早。我知道多路径是为了帮助流从 wifi 无缝转到 4G,但我不知道如何将它实现到我的播放器中。
我的播放器如下,以音频的URL为参数
func loadRadio(radioURL: String) {
guard let url = URL.init(string: radioURL) else { return }
if let playerItem = self.playerItem {
playerItem.removeObserver(self, forKeyPath: #keyPath(AVPlayerItem.status), context: &playerItemContext)
}
let playerItem = AVPlayerItem.init(url: url)
self.playerItem = playerItem
playerItem.addObserver(self, forKeyPath: #keyPath(AVPlayerItem.status), options: [NSKeyValueObservingOptions.old, .new], context: &playerItemContext)
AudioService.shared.player = AVPlayer.init(playerItem: playerItem)
AudioService.shared.player?.automaticallyWaitsToMinimizeStalling = false;
AudioService.shared.player?.play()
}
但它的实现超出了我的范围。
我需要在代码中添加什么来启用多路径服务类型
的handover
类型?
最佳答案
参见:Using an AVPlayer returns a "non-Multipath connection" error
这是苹果需要修复的iOS 13模拟器的bug
关于ios - "nw_endpoint_flow_copy_multipath_subflow_counts Called on non-Multipath connection"导致搜索栏出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58909866/