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.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Builds and returns the
MediaInfo object.
| |||||||||||
Sets the content (MIME) type.
| |||||||||||
Sets the custom application-specific data.
| |||||||||||
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.
IllegalArgumentException | If the content ID is null or empty.
|
---|
Builds and returns the MediaInfo
object.
IllegalArgumentException | If all required fields have not been populated with valid values. |
---|
Sets the content (MIME) type. This is a required field.
IllegalArgumentException | If the content type is null or empty.
|
---|
Sets the custom application-specific data.
Sets the stream duration, in milliseconds.
IllegalArgumentException | If the duration is negative. |
---|
Sets the stream type; one of the STREAM_TYPE_
constants. This is a required
field.
IllegalArgumentException | If the value is not one of the predefined stream type constants. |
---|
Sets the text track style.