Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

close

- - Get Started
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
    - Get the SDK
  - Google Services
- - Google Play
  - Publishing
  - Promoting
  - App Quality
  - Spotlight
  - Open Distribution

## Results

Loading...
Summary: Nested Classes | Constants | Methods | Inherited Methods | [Expand All]
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.
MediaMetadata | getMetadata() Returns the media item metadata.
long | getStreamDuration() Returns the stream duration, in milliseconds.
int | getStreamType() Returns the stream type.
int | hashCode()

[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()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)

## 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 MediaMetadata getMetadata ()

Returns the media item metadata.

#### public long getStreamDuration ()

Returns the stream duration, in milliseconds.

#### public int getStreamType ()

Returns the stream type.

#### public int hashCode ()