getUnixTimeMs

fun Player.getUnixTimeMs(positionMs: Long = currentPosition, window: Timeline.Window = Window()): Long

Calculates the unix time corresponding to the given position in the current media item in milliseconds.

Return

The unix time corresponding to the given position, or C.TIME_UNSET if the timeline is empty or the window start time is unset.

Parameters

positionMs

The position in milliseconds within the current media item. Defaults to the current playback position.

window

A Window object to store the window information. A new instance will be created if not provided.