public interface LoadControl
Modifier and Type | Method and Description |
---|---|
Allocator |
getAllocator()
Returns the
Allocator that should be used to obtain media buffer allocations. |
void |
onPrepared()
Called by the player when prepared with a new source.
|
void |
onReleased()
Called by the player when released.
|
void |
onStopped()
Called by the player when stopped.
|
void |
onTracksSelected(Renderer[] renderers,
TrackGroupArray trackGroups,
TrackSelectionArray trackSelections)
Called by the player when a track selection occurs.
|
boolean |
shouldContinueLoading(long bufferedDurationUs)
Called by the player to determine whether it should continue to load the source.
|
boolean |
shouldStartPlayback(long bufferedDurationUs,
boolean rebuffering)
Called by the player to determine whether sufficient media is buffered for playback to be
started or resumed.
|
void onPrepared()
void onTracksSelected(Renderer[] renderers, TrackGroupArray trackGroups, TrackSelectionArray trackSelections)
renderers
- The renderers.trackGroups
- The TrackGroup
s from which the selection was made.trackSelections
- The track selections that were made.void onStopped()
void onReleased()
Allocator getAllocator()
Allocator
that should be used to obtain media buffer allocations.boolean shouldStartPlayback(long bufferedDurationUs, boolean rebuffering)
bufferedDurationUs
- The duration of media that's currently buffered.rebuffering
- Whether the player is rebuffering. A rebuffer is defined to be caused by
buffer depletion rather than a user action. Hence this parameter is false during initial
buffering and when buffering as a result of a seek operation.boolean shouldContinueLoading(long bufferedDurationUs)
bufferedDurationUs
- The duration of media that's currently buffered.