Closed fandongtongxue closed 8 months ago
控制台打印 po codecpar.field_order.rawValue 3516692992
超出了UInt8的最大值
报错的是音轨还是视频轨呢?可以上传下视频片段到github。这样我才能debug
感谢关注,后来用你这个demo-iOS测试了下可以播放,没啥问题,我用的是develop分支,直接把你的detailvc复制过来了,
方法也同步了
let resource = KSPlayerResource(url: URL(string: resp.url!)!) self.play(resource: resource)
func play(resource: KSPlayerResource?) { let controller = KSPlayerVC() controller.resource = resource self.actionPS.onNext(VMActionType.push(vc: controller, animated: true)) }
Appdelegate里
KSOptions.canBackgroundPlay = true KSOptions.logLevel = .debug KSOptions.firstPlayerType = KSMEPlayer.self KSOptions.secondPlayerType = KSMEPlayer.self // KSOptions.supportedInterfaceOrientations = .all KSOptions.isAutoPlay = true KSOptions.isSecondOpen = true KSOptions.isAccurateSeek = true
一会我写个demo看看
你的demo我测试没问题,我写的就不行呢,我用spm,你用pod的缘故? 我的demo KSDemo.zip
我的demo里面都有pod和spm的例子。你可以用我的spm的例子试下。如果demo没有问题的话,那你就要检查你的代码,看是哪里有问题。如果你一直找不到问题的话,那可以找我寻求技术支持。
作者,您好,我找到问题了,我在项目里也集成了百度网盘的播放器sdk,所以出现了这个问题,你的ffmpeg被他的ffmpeg影响了
拿URL给KSPlayer播放出错 第一张图是写的代码 第二张图是报错位置 附上控制台日志 ksplayer.log