使用 AVURLAsset(url: options:) 后 AVPlayer 当前时间返回错误值

问题描述

我目前正在我的 AVPlayer 上实现 HLS,因此使用

AVURLAsset(url: url,options: HLSoptions)

我注意到持续时间不断返回 NaN 并且能够通过调用来修复

item.asset.duration.seconds

而不是

item.duration.seconds

现在我发现如果视频正在播放,item.currentTime().seconds 会一直返回零,这在以前没有发生过。有谁知道为什么会这样/如何获得正确的时间?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)