Google is committed to advancing racial equity for Black communities. See how.

MediaInfoWriter

public class MediaInfoWriter extends Object

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
setContentId(String contentId)
Sets the content ID.
MediaInfoWriter
setContentType(String contentType)
Sets the content (MIME) type.
MediaInfoWriter
setContentUrl(String contentUrl)
Sets the URL of the content to be played.
MediaInfoWriter
setCustomData(JSONObject customData)
Sets the custom data, if any.
MediaInfoWriter
setEntity(String entity)
Sets the entity: a URI that identifies content in an application-specific way.
MediaInfoWriter
setMediaTracks(List<MediaTrack> mediaTracks)
Sets the list of media tracks, or null if unspecified.
MediaInfoWriter
setMetadata(MediaMetadata mediaMetadata)
Sets the media item metadata.
MediaInfoWriter
setStartAbsoluteTime(long startAbsoluteTime)
Sets the start absolute time in milliseconds in epoch time, or 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
setTextTrackStyle(TextTrackStyle textTrackStyle)
Sets the text track style, or null if unspecified.
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)

Public Methods

public MediaInfo getMediaInfo ()

Returns the wrapped MediaInfo object.

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 UNKNOWN_START_ABSOLUTE_TIME if it is not available.

public MediaInfoWriter setStreamDuration (long streamDuration)

Sets the stream duration, in milliseconds. Set to 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 getAdBreaks() and getAdBreakClips() are not provided.