Back to Exoplayer

SimpleBasePlayer.PositionSupplier (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.PositionSupplier.html

latest2.3 KB
Original Source

Package com.google.android.exoplayer2

Interface SimpleBasePlayer.PositionSupplier


protected static interfaceSimpleBasePlayer.PositionSupplier

A supplier for a position.

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | static SimpleBasePlayer.PositionSupplier | ZERO | An instance returning a constant position of zero. |

Method Summary

All Methods Static Methods Instance Methods Abstract Methods | Modifier and Type | Method | Description | | --- | --- | --- | | long | get() | Returns the position. | | static SimpleBasePlayer.PositionSupplier | getConstant​(long positionMs) | Returns an instance that returns a constant value. | | static SimpleBasePlayer.PositionSupplier | getExtrapolating​(long currentPositionMs, float playbackSpeed) | Returns an instance that extrapolates the provided position into the future. |

Field Detail

- 

ZERO

static final[SimpleBasePlayer.PositionSupplier](SimpleBasePlayer.PositionSupplier.html "interface in com.google.android.exoplayer2")ZERO

An instance returning a constant position of zero.

Method Detail

- 

getConstant

static[SimpleBasePlayer.PositionSupplier](SimpleBasePlayer.PositionSupplier.html "interface in com.google.android.exoplayer2")getConstant​(long positionMs)

Returns an instance that returns a constant value. Parameters:positionMs - The constant position to return, in milliseconds.

- 

getExtrapolating

static[SimpleBasePlayer.PositionSupplier](SimpleBasePlayer.PositionSupplier.html "interface in com.google.android.exoplayer2")getExtrapolating​(long currentPositionMs,
                                                          float playbackSpeed)

Returns an instance that extrapolates the provided position into the future. Parameters:currentPositionMs - The current position in milliseconds.playbackSpeed - The playback speed with which the position is assumed to increase.

- 

get

long get()

Returns the position.