AI-generated Key Takeaways
-
MediaLoadRequestData is used in load commands to specify how a receiver application should load media.
-
Loading a single item uses MediaInfo, while loading a non-cloud queue uses MediaQueueData.
-
When MediaQueueData is specified, getCurrentTime() is ignored and MediaQueueData.getStartTime() is used for the start time.
-
For cloud queues, MediaQueueData can have empty items but must specify the entity for the receiver to fetch the queue from the cloud.
-
The MediaLoadRequestData class includes constants for maximum and minimum playback rates and a value indicating no explicit start position.
The class used in load commands for specifying how a receiver application should load media.
- To load a single item, specify the item to load in
MediaInfo, and setMediaQueueDatatonull. - To load a non-cloud queue, specify the queue information in
MediaQueueData. Optionally, specify the information for the first item inMediaInfo. - If
MediaQueueDatais specified, optiongetCurrentTime()is ignored, andMediaQueueData.getStartTime()is respected. - If the queue is a cloud queue,
MediaQueueDatacan have empty items, but you must specify the entity so that the receiver app can fetch the queue from the cloud using the entity.
Nested Class Summary
| class | MediaLoadRequestData.Builder | Builder class for MediaLoadRequestData. |
|
Constant Summary
| double | PLAYBACK_RATE_MAX | The maximum value that can be used in
MediaLoadRequestData.Builder.setPlaybackRate(double). |
| double | PLAYBACK_RATE_MIN | The minimum value that can be used in
MediaLoadRequestData.Builder.setPlaybackRate(double). |
| long | PLAY_POSITION_UNASSIGNED | The special value for indicating a load request has no explicit start position. |
Inherited Constant Summary
Public Method Summary
| boolean | |
| long[] |
getActiveTrackIds()
Returns the array of the active tracks.
|
| Boolean |
getAutoplay()
Returns the value of whether playback should start immediately.
|
| String |
getCredentials()
Returns the credentials string, as passed in with
MediaLoadOptions.Builder.setCredentials(String).
|
| String |
getCredentialsType()
Returns the credentials type string, as passed in with
MediaLoadOptions.Builder.setCredentialsType(String).
|
| long |
getCurrentTime()
Returns the initial playback position, in milliseconds from the beginning of
the stream.
|
| JSONObject |
getCustomData()
Returns the custom application-specific data to pass along with the load
request.
|
| MediaInfo |
getMediaInfo()
Returns the
MediaInfo
of the load request.
|
| double |
getPlaybackRate()
Returns the playback rate, as the multiplier of the normal playback rate.
|
| MediaQueueData |
getQueueData()
Returns the
MediaQueueData
of the load request.
|
| int |
hashCode()
|
| void |
writeToParcel(Parcel out, int
flags)
|
Inherited Method Summary
Constants
public static final double PLAYBACK_RATE_MAX
The maximum value that can be used in
MediaLoadRequestData.Builder.setPlaybackRate(double).
public static final double PLAYBACK_RATE_MIN
The minimum value that can be used in
MediaLoadRequestData.Builder.setPlaybackRate(double).
public static final long PLAY_POSITION_UNASSIGNED
The special value for indicating a load request has no explicit start position.
If this value is used, non-live streams will be loaded from 0 and live streams will be loaded from the most recent position.
Public Methods
public boolean equals (Object other)
public long[] getActiveTrackIds ()
Returns the array of the active tracks. If the default value is
null.
public Boolean getAutoplay ()
Returns the value of whether playback should start immediately. The default value is
Boolean.TRUE.
public String getCredentials ()
Returns the credentials string, as passed in with
MediaLoadOptions.Builder.setCredentials(String).
public String getCredentialsType ()
Returns the credentials type string, as passed in with
MediaLoadOptions.Builder.setCredentialsType(String).
public long getCurrentTime ()
Returns the initial playback position, in milliseconds from the beginning of the stream. The default value is 0.
public JSONObject getCustomData ()
Returns the custom application-specific data to pass along with the load request.
public double getPlaybackRate ()
Returns the playback rate, as the multiplier of the normal playback rate.
public MediaQueueData getQueueData ()
Returns the MediaQueueData
of the load request.