The modifier to override the MediaInfo
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
public MediaInfoModifier ()
Constructs an instance of MediaInfoModifier
.
Public Methods
public void clear ()
Clears all overrides.
public List<AdBreakClipInfo> getAdBreakClips ()
Returns the list of AdBreakClipInfo
s
to override.
public List<AdBreakInfo> getAdBreaks ()
Returns the list of AdBreakInfo
s
to override.
public String getContentId ()
Returns the content ID to override.
public String getContentType ()
Returns the content (MIME) type to override.
public String getContentUrl ()
Returns the content URL to override.
public JSONObject getCustomData ()
Returns the custom data to override.
public String getEntity ()
Returns the entity to override.
public List<MediaTrack> getMediaTracks ()
Returns the list of media tracks to override.
public MediaMetadataModifier getMetadataModifier ()
Returns the MediaMetadataModifier
.
public Long getStartAbsoluteTime ()
Returns the start absolute time to override.
public Long getStreamDuration ()
Returns the stream duration to override.
public Integer getStreamType ()
Returns the stream type to override.
public TextTrackStyle getTextTrackStyle ()
Returns the text track style to override.
public VastAdsRequest getVmapAdsRequest ()
Returns the VMAP ad request configuration to override.
public MediaInfoModifier setAdBreakClips (List<AdBreakClipInfo> adBreakClips)
Sets the list of AdBreakClipInfo
s.
public MediaInfoModifier setAdBreaks (List<AdBreakInfo> adBreaks)
Sets the list of AdBreakInfo
s.
public MediaInfoModifier setContentId (String contentId)
Sets the content ID to override.
The default value is generated from
MediaMetadataCompat.METADATA_KEY_MEDIA_ID
or
MediaMetadataCompat.METADATA_KEY_MEDIA_URI
. Set to null
to
disable override.
public MediaInfoModifier setContentType (String contentType)
Sets the content (MIME) type.
public MediaInfoModifier setContentUrl (String contentUrl)
Sets the URL of the content to be played.
public MediaInfoModifier setCustomData (JSONObject customData)
Sets the custom data.
public void setDataFromMediaInfo (MediaInfo mediaInfo)
public MediaInfoModifier setEntity (String entity)
Sets the entity: a URI that identifies content in an application-specific way.
public MediaInfoModifier setMediaTracks (List<MediaTrack> mediaTracks)
Sets the list of media tracks.
public void setMetadataModifier (MediaMetadataModifier mediaMetadataModifier)
Sets the MediaMetadataModifier
which modifies the metadata of the processed MediaInfo
.
public MediaInfoModifier setStartAbsoluteTime (Long startAbsoluteTime)
Sets the start absolute time, in milliseconds in epoch time.
public MediaInfoModifier setStreamDuration (Long streamDuration)
Sets the stream duration to override, in milliseconds.
The default value is generated from
MediaMetadataCompat.METADATA_KEY_DURATION
. Set to MediaInfo.UNKNOWN_DURATION
for live streams. Set to null
to disable override.
public MediaInfoModifier setStreamType (Integer streamType)
Sets the stream type to override.
The stream type can be one of the STREAM_TYPE_
constants in
MediaInfo
.
The default value is MediaInfo.STREAM_TYPE_BUFFERED
.
Set to null
to disable override.
public MediaInfoModifier setTextTrackStyle (TextTrackStyle textTrackStyle)
Sets the text track style.
public MediaInfoModifier setVmapAdsRequest (VastAdsRequest vmapAdsRequest)
Sets the VMAP ad request configuration, which is a collection of VAST ads.
See MediaInfo.getVmapAdsRequest()
for details.