protected interface

SimpleBasePlayer.PositionSupplier

 androidx.media3.common.SimpleBasePlayer.PositionSupplier

Overview

A supplier for a position.

Summary

Fields
public static final SimpleBasePlayer.PositionSupplierZERO

An instance returning a constant position of zero.

Methods
public longget()

Returns the position.

public static SimpleBasePlayer.PositionSuppliergetConstant(long positionMs)

Returns an instance that returns a constant value.

public static SimpleBasePlayer.PositionSuppliergetExtrapolating(long currentPositionMs, float playbackSpeed)

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

Fields

public static final SimpleBasePlayer.PositionSupplier ZERO

An instance returning a constant position of zero.

Methods

public static SimpleBasePlayer.PositionSupplier getConstant(long positionMs)

Returns an instance that returns a constant value.

Parameters:

positionMs: The constant position to return, in milliseconds.

public static SimpleBasePlayer.PositionSupplier 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.

public long get()

Returns the position.