SimpleBasePlayer.PositionSupplier


protected interface SimpleBasePlayer.PositionSupplier


A supplier for a position.

Summary

Constants

const SimpleBasePlayer.PositionSupplier!

An instance returning a constant position of zero.

Public functions

Long
get()

Returns the position.

java-static SimpleBasePlayer.PositionSupplier!
getConstant(positionMs: Long)

Returns an instance that returns a constant value.

java-static SimpleBasePlayer.PositionSupplier!
getExtrapolating(currentPositionMs: Long, playbackSpeed: Float)

Returns an instance that extrapolates the provided position into the future.

Constants

ZERO

const val ZEROSimpleBasePlayer.PositionSupplier!

An instance returning a constant position of zero.

Public functions

get

fun get(): Long

Returns the position.

getConstant

java-static fun getConstant(positionMs: Long): SimpleBasePlayer.PositionSupplier!

Returns an instance that returns a constant value.

Parameters
positionMs: Long

The constant position to return, in milliseconds.

getExtrapolating

java-static fun getExtrapolating(currentPositionMs: Long, playbackSpeed: Float): SimpleBasePlayer.PositionSupplier!

Returns an instance that extrapolates the provided position into the future.

Parameters
currentPositionMs: Long

The current position in milliseconds.

playbackSpeed: Float

The playback speed with which the position is assumed to increase.