java.lang.Object | |
↳ | com.google.android.gms.cast.MediaInfo.Builder |
A builder for MediaInfo
objects. MediaInfo
is used by RemoteMediaPlayer
to load media on the receiver application.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new Builder with the given content ID.
| |||||||||||
Constructs a new Builder with the given content ID and entity.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Builds and returns the
MediaInfo object. | |||||||||||
Sets the list of
AdBreakClipInfo s, each containing the content of a specific ad. | |||||||||||
Sets the list of
AdBreakInfo , which describes where each ad break is located and what
AdBreakClipInfo s each break includes. | |||||||||||
Sets the content (MIME) type.
| |||||||||||
Sets the custom application-specific data.
| |||||||||||
Sets the entity, the deep link for the media as used by Google Assistant.
| |||||||||||
Sets the media tracks.
| |||||||||||
Sets the media item metadata.
| |||||||||||
Sets the stream duration, in milliseconds.
| |||||||||||
Sets the stream type; one of the
STREAM_TYPE_ constants. | |||||||||||
Sets the text track style.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Constructs a new Builder with the given content ID.
Parameters | |
---|---|
contentId |
String |
Throws | |
---|---|
IllegalArgumentException |
If the content ID is null .
|
Constructs a new Builder with the given content ID and entity.
Parameters | |
---|---|
contentId |
String |
entity |
String |
Throws | |
---|---|
IllegalArgumentException |
If the content ID is null .
|
Sets the list of AdBreakClipInfo
s, each containing the content of a specific ad.
Parameters | |
---|---|
adBreakClips |
List |
Returns | |
---|---|
MediaInfo.Builder |
Sets the list of AdBreakInfo
, which describes where each ad break is located and what
AdBreakClipInfo
s each break includes.
Parameters | |
---|---|
adBreaks |
List |
Returns | |
---|---|
MediaInfo.Builder |
Sets the content (MIME) type. This is a required field.
Parameters | |
---|---|
contentType |
String |
Returns | |
---|---|
MediaInfo.Builder |
Sets the custom application-specific data.
Parameters | |
---|---|
customData |
JSONObject |
Returns | |
---|---|
MediaInfo.Builder |
Sets the entity, the deep link for the media as used by Google Assistant.
Parameters | |
---|---|
entity |
String |
Returns | |
---|---|
MediaInfo.Builder |
Sets the stream duration, in milliseconds.
Parameters | |
---|---|
duration |
long |
Returns | |
---|---|
MediaInfo.Builder |
Throws | |
---|---|
IllegalArgumentException |
If the duration is negative. |
Sets the stream type; one of the STREAM_TYPE_
constants. This is a required field.
Parameters | |
---|---|
streamType |
int |
Returns | |
---|---|
MediaInfo.Builder |
Throws | |
---|---|
IllegalArgumentException |
If the value is not one of the predefined stream type constants. |