Find current window live time in exoplayer 2.11.8

Viewed 72

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'

0 Answers
Related