public final class

MediaInfo

extends Object
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".
Public Methods
boolean equals(Object other)
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.
[Expand]
Inherited Methods
From class java.lang.Object

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 Methods

public boolean equals (Object other)

public String getContentId ()

Returns the content ID.

public String getContentType ()

Returns the content (MIME) type.

public JSONObject getCustomData ()

Returns the custom data, if any.

public List<MediaTrack> getMediaTracks ()

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

public MediaMetadata getMetadata ()

Returns the media item metadata.

public long getStreamDuration ()

Returns the stream duration, in milliseconds.

public int getStreamType ()

Returns the stream type; one of the STREAM_TYPE_ constants.

public TextTrackStyle getTextTrackStyle ()

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

public int hashCode ()

public void setTextTrackStyle (TextTrackStyle textTrackStyle)

Sets the text track style.