LoadingInfo
@UnstableApi
class LoadingInfo
Information about the player state when loading is started or continued.
Summary
Nested types |
|---|
class LoadingInfo.BuilderA builder for |
Public functions |
|
|---|---|
LoadingInfo.Builder! |
Creates a new |
Boolean |
|
Int |
hashCode() |
Boolean |
rebufferedSince(realtimeMs: Long)Checks if rebuffering has occurred since |
Public properties |
|
|---|---|
Long |
Sets the time at which the last rebuffering occurred, in milliseconds since boot including time spent in sleep. |
Long |
The current playback position in microseconds, or |
Float |
The playback speed indicating the current rate of playback, or |
Public functions
buildUpon
fun buildUpon(): LoadingInfo.Builder!
Creates a new Builder, copying the initial values from this instance.
rebufferedSince
fun rebufferedSince(realtimeMs: Long): Boolean
Checks if rebuffering has occurred since realtimeMs.
| Parameters | |
|---|---|
realtimeMs: Long |
The time to compare against, as measured by |
| Returns | |
|---|---|
Boolean |
Whether rebuffering has occurred since the provided timestamp. |
Public properties
lastRebufferRealtimeMs
val lastRebufferRealtimeMs: Long
Sets the time at which the last rebuffering occurred, in milliseconds since boot including time spent in sleep.
The time base used is the same as that measured by elapsedRealtime.
Note: If rebuffer events are not known when the load is started or continued, or if no rebuffering has occurred, or if there have been any user interactions such as seeking or stopping the player, the value will be set to TIME_UNSET.
playbackPositionUs
val playbackPositionUs: Long
The current playback position in microseconds, or TIME_UNSET if unset. If playback of the period to which this loading info belongs has not yet started, the value will be the starting position in the period minus the duration of any media in previous periods still to be played.
playbackSpeed
val playbackSpeed: Float
The playback speed indicating the current rate of playback, or RATE_UNSET if playback speed is not known when the load is started or continued.