AI-generated Key Takeaways
-
MediaInfoWriteris a class used to modify aMediaInfoinstance. -
You can construct a
MediaInfoWriterby providing aMediaInfoobject to its constructor. -
The
MediaInfoWriterprovides methods to set various properties of theMediaInfoobject, such as content ID, content type, content URL, stream duration, and ad information. -
You can retrieve the modified
MediaInfoobject from theMediaInfoWriterusing thegetMediaInfo()method.
The writer class to modify a MediaInfo
instance.
Public Constructor Summary
Public Method Summary
| MediaInfo |
getMediaInfo()
Returns the wrapped
MediaInfo
object.
|
| MediaInfoWriter |
setAdBreakClips(List<AdBreakClipInfo>
adBreakClips)
Sets an unmodifiable list of
AdBreakClipInfos,
or null if unspecified.
|
| MediaInfoWriter |
setAdBreaks(List<AdBreakInfo>
adBreaks)
Sets an unmodifiable list of
AdBreakInfos,
or null if unspecified.
|
| MediaInfoWriter | |
| MediaInfoWriter | |
| MediaInfoWriter | |
| MediaInfoWriter | |
| MediaInfoWriter | |
| MediaInfoWriter | |
| MediaInfoWriter | |
| MediaInfoWriter |
setStartAbsoluteTime(long startAbsoluteTime)
Sets the start absolute time in milliseconds in epoch time, or
MediaInfo.UNKNOWN_START_ABSOLUTE_TIME if it is not available.
|
| MediaInfoWriter |
setStreamDuration(long streamDuration)
Sets the stream duration, in milliseconds.
|
| MediaInfoWriter |
setStreamType(int streamType)
Sets the stream type.
|
| MediaInfoWriter | |
| MediaInfoWriter |
setVmapAdsRequest(VastAdsRequest
vmapAdsRequest)
Sets the VMAP ad request configuration, which is a collection of VAST ads.
|
Inherited Method Summary
Public Constructors
public MediaInfoWriter (MediaInfo mediaInfo)
Constructs an instance of MediaInfoWriter.
Public Methods
public MediaInfoWriter setAdBreakClips (List<AdBreakClipInfo> adBreakClips)
Sets an unmodifiable list of AdBreakClipInfos,
or null if unspecified.
public MediaInfoWriter setAdBreaks (List<AdBreakInfo> adBreaks)
Sets an unmodifiable list of AdBreakInfos,
or null if unspecified.
public MediaInfoWriter setContentId (String contentId)
Sets the content ID.
Throws
| IllegalArgumentException | if the content ID is null. |
|---|
public MediaInfoWriter setContentType (String contentType)
Sets the content (MIME) type.
public MediaInfoWriter setContentUrl (String contentUrl)
Sets the URL of the content to be played.
public MediaInfoWriter setCustomData (JSONObject customData)
Sets the custom data, if any.
public MediaInfoWriter setEntity (String entity)
Sets the entity: a URI that identifies content in an application-specific way.
public MediaInfoWriter setMediaTracks (List<MediaTrack> mediaTracks)
Sets the list of media tracks, or null if unspecified.
public MediaInfoWriter setMetadata (MediaMetadata mediaMetadata)
Sets the media item metadata.
public MediaInfoWriter setStartAbsoluteTime (long startAbsoluteTime)
Sets the start absolute time in milliseconds in epoch time, or
MediaInfo.UNKNOWN_START_ABSOLUTE_TIME if it is not available.
public MediaInfoWriter setStreamDuration (long streamDuration)
Sets the stream duration, in milliseconds. Set to MediaInfo.UNKNOWN_DURATION
for live streams.
public MediaInfoWriter setStreamType (int streamType)
Sets the stream type. The type can be one of the STREAM_TYPE_ constants
from MediaInfo.
public MediaInfoWriter setTextTrackStyle (TextTrackStyle textTrackStyle)
Sets the text track style, or null if unspecified.
public MediaInfoWriter setVmapAdsRequest (VastAdsRequest vmapAdsRequest)
Sets 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 if MediaInfo.getAdBreaks()
and MediaInfo.getAdBreakClips()
are not provided.