java.lang.Object |
↳ |
com.google.android.gms.cast.MediaInfo.Builder |
Summary
Public Constructors |
|
MediaInfo.Builder(String contentId)
Constructs a new Builder with the given content ID.
|
[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
MediaInfo.Builder
(String contentId)
Constructs a new Builder with the given content ID.
Parameters |
contentId |
String
|
Throws |
IllegalArgumentException |
If the content ID is null or empty.
|
Public Methods
Builds and returns the MediaInfo
object.
Throws |
IllegalArgumentException |
If all required fields have not been populated with
valid values.
|
public
MediaInfo.Builder
setContentType
(String contentType)
Sets the content (MIME) type. This is a required field.
Parameters |
contentType |
String
|
Throws |
IllegalArgumentException |
If the content type is null or empty.
|
public
MediaInfo.Builder
setCustomData
(JSONObject customData)
Sets the custom application-specific data.
Parameters |
customData |
JSONObject
|
Sets the media tracks.
Parameters |
mediaTracks |
List
|
Sets the media item metadata.
Parameters |
metadata |
MediaMetadata
|
public
MediaInfo.Builder
setStreamDuration
(long duration)
Sets the stream duration, in milliseconds.
Throws |
IllegalArgumentException |
If the duration is negative.
|
public
MediaInfo.Builder
setStreamType
(int streamType)
Sets the stream type; one of the STREAM_TYPE_
constants. This is a required
field.
Parameters |
streamType |
int
|
Throws |
IllegalArgumentException |
If the value is not one of the predefined stream type
constants.
|
Sets the text track style.
Parameters |
textTrackStyle |
TextTrackStyle
|