LoadEventInfo
@UnstableApi
public final class LoadEventInfo
MediaSource load event information.
Summary
Public fields |
|
|---|---|
final long |
The number of bytes that were loaded up to the event time. |
final DataSpec |
Defines the requested data. |
final long |
The value of |
final long |
The duration of the load up to the event time. |
final long |
Identifies the load task to which this event corresponds. |
final Map<String, List<String>> |
The response headers associated with the load, or an empty map if unavailable. |
final Uri |
The |
Public constructors |
|---|
LoadEventInfo(Equivalent to |
LoadEventInfo(Creates load event info. |
Public methods |
|
|---|---|
LoadEventInfo |
copyWithTaskIdAndDurationMs(long loadTaskId, long loadDurationMs) |
static long |
getNewId()Returns an non-negative identifier which is unique to the JVM instance. |
Public fields
bytesLoaded
public final long bytesLoaded
The number of bytes that were loaded up to the event time.
elapsedRealtimeMs
public final long elapsedRealtimeMs
The value of elapsedRealtime at the time of the load event.
responseHeaders
public final Map<String, List<String>> responseHeaders
The response headers associated with the load, or an empty map if unavailable.
Public constructors
LoadEventInfo
public LoadEventInfo(
long loadTaskId,
DataSpec dataSpec,
long elapsedRealtimeMs
)
Equivalent to LoadEventInfo(loadTaskId, dataSpec, dataSpec.uri, Collections.emptyMap(), elapsedRealtimeMs, 0, 0).
LoadEventInfo
public LoadEventInfo(
long loadTaskId,
DataSpec dataSpec,
Uri uri,
Map<String, List<String>> responseHeaders,
long elapsedRealtimeMs,
long loadDurationMs,
long bytesLoaded
)
Creates load event info.
| Parameters | |
|---|---|
long loadTaskId |
See |
DataSpec dataSpec |
See |
Uri uri |
See |
Map<String, List<String>> responseHeaders |
See |
long elapsedRealtimeMs |
See |
long loadDurationMs |
See |
long bytesLoaded |
See |
Public methods
copyWithTaskIdAndDurationMs
public LoadEventInfo copyWithTaskIdAndDurationMs(long loadTaskId, long loadDurationMs)
getNewId
public static long getNewId()
Returns an non-negative identifier which is unique to the JVM instance.