MediaLoadRequestData.Builder

public static class MediaLoadRequestData.Builder extends Object

Builder class for MediaLoadRequestData.

Public Constructor Summary

Public Method Summary

MediaLoadRequestData
build()
Builds a MediaLoadRequestData object.
MediaLoadRequestData.Builder
setActiveTrackIds(long[] activeTrackIds)
Sets the array of the active tracks.
MediaLoadRequestData.Builder
setAutoplay(Boolean autoplay)
Sets the value of whether playback should start immediately.
MediaLoadRequestData.Builder
setCredentials(String credentials)
Sets the user credentials to pass along with the load request to the receiver.
MediaLoadRequestData.Builder
setCredentialsType(String credentialsType)
Sets the user credentials type to pass along with the load request to the receiver.
MediaLoadRequestData.Builder
setCurrentTime(long currentTime)
Sets the initial playback position, in milliseconds from the beginning of the stream.
MediaLoadRequestData.Builder
setCustomData(JSONObject customData)
Sets the custom application-specific data to pass along with the load request.
MediaLoadRequestData.Builder
setMediaInfo(MediaInfo mediaInfo)
Sets the MediaInfo of the load request.
MediaLoadRequestData.Builder
setPlaybackRate(double playbackRate)
Sets the playback rate, as the multiplier of the normal playback rate.
MediaLoadRequestData.Builder
setQueueData(MediaQueueData queueData)
Sets the MediaQueueData of the load request.

Inherited Method Summary

Public Constructors

public MediaLoadRequestData.Builder ()

Public Methods

public MediaLoadRequestData build ()

Builds a MediaLoadRequestData object.

public MediaLoadRequestData.Builder setActiveTrackIds (long[] activeTrackIds)

Sets the array of the active tracks.

public MediaLoadRequestData.Builder setAutoplay (Boolean autoplay)

Sets the value of whether playback should start immediately. The default value is TRUE.

When loading a queue by specifying the queue items in setQueueData(MediaQueueData), this value overrides the getAutoplay() property of the first MediaQueueItem to be loaded. Only when this field is null, the getAutoplay() property of individual MediaQueueItems in MediaQueueData will take effect.

When loading a single item by specifying the MediaInfo in setMediaInfo(MediaInfo), this field will specify the playback should start upon load. If null, the playback will not start immediately.

public MediaLoadRequestData.Builder setCredentials (String credentials)

Sets the user credentials to pass along with the load request to the receiver. The credentials are completely application-specific and can be any arbitrary String.

public MediaLoadRequestData.Builder setCredentialsType (String credentialsType)

Sets the user credentials type to pass along with the load request to the receiver. The credentials type is completely application-specific and can be any arbitrary String.

public MediaLoadRequestData.Builder setCurrentTime (long currentTime)

Sets the initial playback position, in milliseconds from the beginning of the stream.

If not set, the receiver will decide the position depending on the stream type. Non-live streams will be loaded from 0 and live streams will be loaded from the most recent position.

public MediaLoadRequestData.Builder setCustomData (JSONObject customData)

Sets the custom application-specific data to pass along with the load request.

public MediaLoadRequestData.Builder setMediaInfo (MediaInfo mediaInfo)

Sets the MediaInfo of the load request.

public MediaLoadRequestData.Builder setPlaybackRate (double playbackRate)

Sets the playback rate, as the multiplier of the normal playback rate. The accepted value is between PLAYBACK_RATE_MIN and PLAYBACK_RATE_MAX. The normal playback rate is 1.0, which is the default playback rate.

public MediaLoadRequestData.Builder setQueueData (MediaQueueData queueData)

Sets the MediaQueueData of the load request.