java.lang.Object |
↳ |
com.google.android.gms.cast.MediaQueueItem.Builder |
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public Constructors
public
MediaQueueItem.Builder
(MediaInfo media)
Constructs a new Builder with the given MediaInfo
.
Parameters |
media |
MediaInfo
|
Throws |
IllegalArgumentException |
If the MediaInfo is null .
|
public
MediaQueueItem.Builder
(JSONObject json)
Constructs a new Builder from the given JSONObject
.
Parameters |
json |
JSONObject
|
Throws |
JSONException |
if any JSON parsing error.
|
public
MediaQueueItem.Builder
(MediaQueueItem item)
Copy constructor, reads defaults from provided MediaQueueItem
.
Parameters |
item |
MediaQueueItem
|
Throws |
IllegalArgumentException |
If the getMedia() is
null .
|
Public Methods
Builds and returns the MediaQueueItem
object.
Throws |
IllegalArgumentException |
If all required fields have not been populated with
valid values.
|
public
MediaQueueItem.Builder
setActiveTrackIds
(long[] activeTrackIds)
Optional. Sets the list of active track IDs.
Parameters |
activeTrackIds |
long
|
Optional. Sets the autoplay preference.
Parameters |
autoplay |
boolean
|
public
MediaQueueItem.Builder
setCustomData
(JSONObject customData)
Optional. Sets the custom application-specific data.
Parameters |
customData |
JSONObject
|
public
MediaQueueItem.Builder
setPlaybackDuration
(double playbackDuration)
Optional. Sets the playback duration, in seconds.
Parameters |
playbackDuration |
double
|
Optional. Sets the preload hint, in seconds.
Parameters |
preloadTime |
double
|
Throws |
IllegalArgumentException |
If the preload time is negative.
|
Optional. Sets the start position of the stream, in seconds.
Parameters |
startTime |
double
|
Throws |
IllegalArgumentException |
If the start time is negative.
|