在 exoplayer 2.11.8 中查找当前窗口实时时间
我正在尝试获取 expolaer 版本 2.11.8 中的当前窗口实时时间
到目前为止,从不同的参考文献和链接中我能够得出这个
fun BasePlayer.getLivePosition(): Long {
var position: Long = currentPosition
if (!currentTimeline.isEmpty) {
position -= currentTimeline.getPeriod(currentPeriodIndex, Timeline.Period())
.positionInWindowMs
}
return position
}
它确实给了我位置,但我无法将其转换为米尔斯的当前时间。 我想要格式为 yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
的实时窗口时间
I am trying to get the current window live time in expolayer version 2.11.8
So far from different references and links I was able to come up with this
fun BasePlayer.getLivePosition(): Long {
var position: Long = currentPosition
if (!currentTimeline.isEmpty) {
position -= currentTimeline.getPeriod(currentPeriodIndex, Timeline.Period())
.positionInWindowMs
}
return position
}
It does gives me the position but I am not able to convert it to current time in mills.
I want the live window time in format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我能够进入2.13以上的exoplayer版本
I was able to get in the exoplayer version above 2.13