The modifier to override theMediaInfo
auto-generated from MediaSession, and provide additional fields that are not in
MediaSession.
Public Constructor Summary
MediaInfoModifier()
Constructs an instance of
MediaInfoModifier .
|
Public Method Summary
void |
clear()
Clears all overrides.
|
List<AdBreakClipInfo> |
getAdBreakClips()
Returns the list of
AdBreakClipInfo s
to override.
|
List<AdBreakInfo> |
getAdBreaks()
Returns the list of
AdBreakInfo s
to override.
|
String |
getContentId()
Returns the content ID to override.
|
String |
getContentType()
Returns the content (MIME) type to override.
|
String |
getContentUrl()
Returns the content URL to override.
|
JSONObject |
getCustomData()
Returns the custom data to override.
|
String |
getEntity()
Returns the entity to override.
|
List<MediaTrack> |
getMediaTracks()
Returns the list of media tracks to override.
|
MediaMetadataModifier |
getMetadataModifier()
Returns the
MediaMetadataModifier .
|
Long |
getStartAbsoluteTime()
Returns the start absolute time to override.
|
Long |
getStreamDuration()
Returns the stream duration to override.
|
Integer |
getStreamType()
Returns the stream type to override.
|
TextTrackStyle |
getTextTrackStyle()
Returns the text track style to override.
|
VastAdsRequest |
getVmapAdsRequest()
Returns the VMAP ad request configuration to override.
|
MediaInfoModifier | |
MediaInfoModifier | |
MediaInfoModifier | |
MediaInfoModifier | |
MediaInfoModifier | |
MediaInfoModifier | |
void | |
MediaInfoModifier | |
MediaInfoModifier | |
void |
setMetadataModifier(MediaMetadataModifier
mediaMetadataModifier)
Sets the
MediaMetadataModifier which modifies the metadata of the processed
MediaInfo .
|
MediaInfoModifier |
setStartAbsoluteTime(Long
startAbsoluteTime)
Sets the start absolute time, in milliseconds in epoch time.
|
MediaInfoModifier | |
MediaInfoModifier | |
MediaInfoModifier | |
MediaInfoModifier |
setVmapAdsRequest(VastAdsRequest
vmapAdsRequest)
Sets the VMAP ad request configuration, which is a collection of VAST ads.
|
Inherited Method Summary
Public Constructors
publicMediaInfoModifier()
Constructs an instance ofMediaInfoModifier
.
Public Methods
public voidclear()
Clears all overrides.
publicList<AdBreakClipInfo> getAdBreakClips()
Returns the list ofAdBreakClipInfo
s
to override.
publicList<AdBreakInfo> getAdBreaks()
Returns the list ofAdBreakInfo
s
to override.
publicStringgetContentId()
Returns the content ID to override.
publicStringgetContentType()
Returns the content (MIME) type to override.
publicStringgetContentUrl()
Returns the content URL to override.
publicJSONObject getCustomData()
Returns the custom data to override.
publicStringgetEntity()
Returns the entity to override.
publicList<MediaTrack> getMediaTracks()
Returns the list of media tracks to override.
publicMediaMetadataModifier getMetadataModifier()
Returns theMediaMetadataModifier
.
publicLonggetStartAbsoluteTime()
Returns the start absolute time to override.
publicLonggetStreamDuration()
Returns the stream duration to override.
publicIntegergetStreamType()
Returns the stream type to override.
publicTextTrackStyle getTextTrackStyle()
Returns the text track style to override.
publicVastAdsRequest getVmapAdsRequest()
Returns the VMAP ad request configuration to override.
publicMediaInfoModifier setAdBreakClips(List<AdBreakClipInfo> adBreakClips)
Sets the list ofAdBreakClipInfo
s.
publicMediaInfoModifier setAdBreaks(List<AdBreakInfo> adBreaks)
Sets the list ofAdBreakInfo
s.
publicMediaInfoModifier setContentId(StringcontentId)
Sets the content ID to override.
The default value is generated from
MediaMetadataCompat.METADATA_KEY_MEDIA_ID
or
MediaMetadataCompat.METADATA_KEY_MEDIA_URI
.Set tonull
to
disable override.
publicMediaInfoModifier setContentType(String contentType)
Sets the content (MIME) type.
publicMediaInfoModifier setContentUrl(String contentUrl)
Sets the URL of the content to be played.
publicMediaInfoModifier setCustomData(JSONObject customData)
Sets the custom data.
public voidsetDataFromMediaInfo(MediaInfo mediaInfo)
publicMediaInfoModifier setEntity(Stringentity)
Sets the entity: a URI that identifies content in an application-specific way.
publicMediaInfoModifier setMediaTracks(List<MediaTrack> mediaTracks)
Sets the list of media tracks.
public voidsetMetadataModifier(MediaMetadataModifier mediaMetadataModifier)
Sets theMediaMetadataModifier
which modifies the metadata of the processedMediaInfo
.
publicMediaInfoModifier setStartAbsoluteTime(Long startAbsoluteTime)
Sets the start absolute time, in milliseconds in epoch time.
publicMediaInfoModifier setStreamDuration(Long streamDuration)
Sets the stream duration to override, in milliseconds.
The default value is generated from
MediaMetadataCompat.METADATA_KEY_DURATION
.Set toMediaInfo.UNKNOWN_DURATION
for live streams. Set tonull
to disable override.
publicMediaInfoModifier setStreamType(Integer streamType)
Sets the stream type to override.
The stream type can be one of theSTREAM_TYPE_
constants in
MediaInfo
.
The default value isMediaInfo.STREAM_TYPE_BUFFERED
.
Set tonull
to disable override.
publicMediaInfoModifier setTextTrackStyle(TextTrackStyle textTrackStyle)
Sets the text track style.
publicMediaInfoModifier setVmapAdsRequest(VastAdsRequest vmapAdsRequest)
Sets the VMAP ad request configuration, which is a collection of VAST ads.
SeeMediaInfo.getVmapAdsRequest()
for details.