public final class

MediaInfo

extends Object
implements Parcelable Parcelable
java.lang.Object
   ↳ com.google.android.gms.cast.MediaInfo

Class Overview

A class that aggregates information about a media item. Use MediaInfo.Builder to build an instance of this class. MediaInfo is used by RemoteMediaPlayer to load media on the receiver application.

Summary

Nested Classes
class MediaInfo.Builder A builder for MediaInfo objects. 
Constants
int STREAM_TYPE_BUFFERED A buffered stream type.
int STREAM_TYPE_INVALID An invalid (unknown) stream type.
int STREAM_TYPE_LIVE A live stream type.
int STREAM_TYPE_NONE A stream type of "none".
long UNKNOWN_DURATION A constant indicating an unknown duration, such as for a live stream.
[Expand]
Inherited Constants
From interface android.os.Parcelable
Public Methods
boolean equals(Object other)
List<AdBreakClipInfo> getAdBreakClips()
Returns an unmodifiable list of AdBreakClipInfos, or null if none have been specified.
List<AdBreakInfo> getAdBreaks()
Returns an unmodifiable list of AdBreakInfos, or null if none have been specified.
String getContentId()
Returns the content ID.
String getContentType()
Returns the content (MIME) type.
JSONObject getCustomData()
Returns the custom data, if any.
List<MediaTrack> getMediaTracks()
Returns the list of media tracks, or null if none have been specified.
MediaMetadata getMetadata()
Returns the media item metadata.
long getStreamDuration()
Returns the stream duration, in milliseconds.
int getStreamType()
Returns the stream type; one of the STREAM_TYPE_ constants.
TextTrackStyle getTextTrackStyle()
Returns the text track style, or null if none has been specified.
int hashCode()
void setTextTrackStyle(TextTrackStyle textTrackStyle)
Sets the text track style.
void writeToParcel(Parcel out, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Constants

public static final int STREAM_TYPE_BUFFERED

A buffered stream type.

Constant Value: 1 (0x00000001)

public static final int STREAM_TYPE_INVALID

An invalid (unknown) stream type.

Constant Value: -1 (0xffffffff)

public static final int STREAM_TYPE_LIVE

A live stream type.

Constant Value: 2 (0x00000002)

public static final int STREAM_TYPE_NONE

A stream type of "none".

Constant Value: 0 (0x00000000)

public static final long UNKNOWN_DURATION

A constant indicating an unknown duration, such as for a live stream.

Constant Value: -1 (0xffffffffffffffff)

Public Methods

public boolean equals (Object other)

Parameters
other Object
Returns
boolean

public List<AdBreakClipInfo> getAdBreakClips ()

Returns an unmodifiable list of AdBreakClipInfos, or null if none have been specified.

Returns
List<AdBreakClipInfo>

public List<AdBreakInfo> getAdBreaks ()

Returns an unmodifiable list of AdBreakInfos, or null if none have been specified.

Returns
List<AdBreakInfo>

public String getContentId ()

Returns the content ID.

Returns
String

public String getContentType ()

Returns the content (MIME) type.

Returns
String

public JSONObject getCustomData ()

Returns the custom data, if any.

Returns
JSONObject

public List<MediaTrack> getMediaTracks ()

Returns the list of media tracks, or null if none have been specified.

Returns
List<MediaTrack>

public MediaMetadata getMetadata ()

Returns the media item metadata.

Returns
MediaMetadata

public long getStreamDuration ()

Returns the stream duration, in milliseconds. Returns UNKNOWN_DURATION for live streams.

Returns
long

public int getStreamType ()

Returns the stream type; one of the STREAM_TYPE_ constants.

Returns
int

public TextTrackStyle getTextTrackStyle ()

Returns the text track style, or null if none has been specified.

Returns
TextTrackStyle

public int hashCode ()

Returns
int

public void setTextTrackStyle (TextTrackStyle textTrackStyle)

Sets the text track style.

Parameters
textTrackStyle TextTrackStyle

public void writeToParcel (Parcel out, int flags)

Parameters
out Parcel
flags int