A class that aggregates information about a media item. UseMediaInfo.Builder
to build an instance of this class.MediaInfo
is used
byRemoteMediaPlayer
to load media on the receiver application.
Nested Class Summary
class | MediaInfo.Builder | A builder forMediaInfo
objects. |
Constant Summary
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. |
long | UNKNOWN_START_ABSOLUTE_TIME | A constant indicating an unknown start absolute time. |
Inherited Constant Summary
Public Method Summary
boolean | |
List<AdBreakClipInfo> |
getAdBreakClips()
Returns an unmodifiable list of
AdBreakClipInfo s,
ornull if none have been specified.
|
List<AdBreakInfo> |
getAdBreaks()
Returns an unmodifiable list of
AdBreakInfo s,
ornull if none have been specified.
|
String |
getContentId()
Returns the content ID.
|
String |
getContentType()
Returns the content (MIME) type.
|
String |
getContentUrl()
Returns the URL of the content to be played.
|
JSONObject |
getCustomData()
Returns the custom data, if any.
|
String |
getEntity()
Returns the entity: a URI that identifies content in an application-specific
way.
|
String |
getHlsSegmentFormat()
Returns the
HlsSegmentFormat ,
ornull if none have been specified.
|
String |
getHlsVideoSegmentFormat()
Returns the
HlsVideoSegmentFormat ,
ornull if none have been specified.
|
List<MediaTrack> |
getMediaTracks()
Returns the list of media tracks, or
null if none have been
specified.
|
MediaMetadata |
getMetadata()
Returns the media item metadata.
|
long |
getStartAbsoluteTime()
Returns the start absolute time in milliseconds in epoch time, or
UNKNOWN_START_ABSOLUTE_TIME if it is not available.
|
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.
|
VastAdsRequest |
getVmapAdsRequest()
Gets the VMAP ad request configuration, which is a collection of VAST ads.
|
int |
hashCode()
|
void | |
void |
writeToParcel(Parcelout, int
flags)
|
Inherited Method Summary
Constants
public static final int STREAM_TYPE_BUFFERED
A buffered stream type.
public static final int STREAM_TYPE_INVALID
An invalid (unknown) stream type.
public static final int STREAM_TYPE_LIVE
A live stream type.
public static final int STREAM_TYPE_NONE
A stream type of "none".
public static final long UNKNOWN_DURATION
A constant indicating an unknown duration, such as for a live stream.
public static final long UNKNOWN_START_ABSOLUTE_TIME
A constant indicating an unknown start absolute time.
Public Methods
public booleanequals(Objectother)
publicList<AdBreakClipInfo> getAdBreakClips()
Returns an unmodifiable list ofAdBreakClipInfo
s,
ornull
if none have been specified.
publicList<AdBreakInfo> getAdBreaks()
Returns an unmodifiable list ofAdBreakInfo
s,
ornull
if none have been specified.
publicStringgetContentId()
Returns the content ID.
publicStringgetContentType()
Returns the content (MIME) type.
publicStringgetContentUrl()
Returns the URL of the content to be played.
publicJSONObject getCustomData()
Returns the custom data, if any.
publicStringgetEntity()
Returns the entity: a URI that identifies content in an application-specific way.
publicStringgetHlsSegmentFormat()
Returns theHlsSegmentFormat
,
ornull
if none have been specified.
publicStringgetHlsVideoSegmentFormat()
Returns theHlsVideoSegmentFormat
,
ornull
if none have been specified.
publicList<MediaTrack> getMediaTracks()
Returns the list of media tracks, ornull
if none have been
specified.
publicMediaMetadata getMetadata()
Returns the media item metadata.
public longgetStartAbsoluteTime()
Returns the start absolute time in milliseconds in epoch time, or
UNKNOWN_START_ABSOLUTE_TIME
if it is not available. Defaults to
UNKNOWN_START_ABSOLUTE_TIME
.
public longgetStreamDuration()
Returns the stream duration, in milliseconds. ReturnsUNKNOWN_DURATION
for live streams.
public intgetStreamType()
Returns the stream type; one of theSTREAM_TYPE_
constants.
publicTextTrackStyle getTextTrackStyle()
Returns the text track style, ornull
if none has been specified.
publicVastAdsRequest getVmapAdsRequest()
Gets the VMAP ad request configuration, which is a collection of VAST ads.Digital Video Ad Serving Template (VAST)is a common protocol that enables ad servers to use a single ad response format across multiple publishers/video players.
This is used to load ads ifgetAdBreaks()
andgetAdBreakClips()
are not provided.
public inthashCode()
public voidsetTextTrackStyle(TextTrackStyle textTrackStyle)
Sets the text track style.