public static class

MediaLoadOptions.Builder

extends Object
java.lang.Object
   ↳ com.google.android.gms.cast.MediaLoadOptions.Builder

Class Overview

Builder for MediaLoadOptions to build the object.

Summary

Public Constructors
MediaLoadOptions.Builder()
Public Methods
MediaLoadOptions build()
Builds a MediaLoadOptions object.
MediaLoadOptions.Builder setActiveTrackIds(long[] activeTrackIds)
Sets the array of the active tracks.
MediaLoadOptions.Builder setAutoplay(boolean autoplay)
Sets the value of whether playback should start immediately.
MediaLoadOptions.Builder setCredentials(String credentials)
Sets the user credentials to pass along with the load request to the receiver.
MediaLoadOptions.Builder setCredentialsType(String credentialsType)
Sets the user credentials type to pass along with the load request to the receiver.
MediaLoadOptions.Builder setCustomData(JSONObject customData)
Sets the custom application-specific data to pass along with the load request.
MediaLoadOptions.Builder setPlayPosition(long playPosition)
Sets the initial playback position, in milliseconds from the beginning of the stream.
MediaLoadOptions.Builder setPlaybackRate(double playbackRate)
Sets the playback rate, as the multiplier of the normal playback rate.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public MediaLoadOptions.Builder ()

Public Methods

public MediaLoadOptions build ()

Builds a MediaLoadOptions object.

Returns
MediaLoadOptions

public MediaLoadOptions.Builder setActiveTrackIds (long[] activeTrackIds)

Sets the array of the active tracks.

Parameters
activeTrackIds long
Returns
MediaLoadOptions.Builder

public MediaLoadOptions.Builder setAutoplay (boolean autoplay)

Sets the value of whether playback should start immediately.

Parameters
autoplay boolean
Returns
MediaLoadOptions.Builder

public MediaLoadOptions.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.

Parameters
credentials String
Returns
MediaLoadOptions.Builder

public MediaLoadOptions.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.

Parameters
credentialsType String
Returns
MediaLoadOptions.Builder

public MediaLoadOptions.Builder setCustomData (JSONObject customData)

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

Parameters
customData JSONObject
Returns
MediaLoadOptions.Builder

public MediaLoadOptions.Builder setPlayPosition (long playPosition)

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

Parameters
playPosition long
Returns
MediaLoadOptions.Builder

public MediaLoadOptions.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.

Parameters
playbackRate double
Returns
MediaLoadOptions.Builder