Class PlaylistItem
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final <any>final DrmConfigfinal Integerfinal List<ExternalMetadata>A list of external metadata in the video the user wishes to receive a meta eventfinal Stringfinal StringHTTP Headers that should be used when requesting this playlist itemfinal ImaDaiSettingsfinal doubleThe target live sync duration in seconds for live streams.final MediaDrmCallbackTheMediaDrmCallbackthat is used for key and provisioning requests.final Stringfinal Stringfinal List<MediaSource>final Doublefinal JSONObjectfinal String -
Method Summary
Modifier and TypeMethodDescriptionintgetFile()getImage()doubleReturns the target live sync duration in seconds for live streams.getTitle()JSONObjectvoidsetDescription(String description) Sets the description of this playlist item.voidvoidSets the title of this playlist item.voidwriteToParcel(Parcel dest, int flags)
-
Field Details
-
mTitle
-
mDescription
-
mFile
-
mImage
-
mMediaId
-
mFeedId
-
mRecommendations
-
mSources
-
mTracks
-
mAdSchedule
-
mVmapUrlOrXML
-
mStartTime
-
mDuration
-
mHttpHeaders
HTTP Headers that should be used when requesting this playlist item -
mMediaDrmCallback
TheMediaDrmCallbackthat is used for key and provisioning requests. -
mImaDaiSettings
-
mDrmConfig
-
mUserInfo
public final JSONObject mUserInfo -
mExternalMetadata
A list of external metadata in the video the user wishes to receive a meta event -
mLiveSyncDuration
public final double mLiveSyncDurationThe target live sync duration in seconds for live streams.When set, the player will attempt to maintain this offset behind the live edge during playback. This is useful for live streams where captions or other processing need additional buffer time beyond the player's default proximity to the live edge.
A value of 0 means unset (use the player's default behavior). Valid range is 5-45 seconds; values outside this range are clamped.
-
CREATOR
public static final <any> CREATOR
-
-
Method Details
-
setImage
-
setTitle
Sets the title of this playlist item.- Parameters:
title- The new title for this item.
-
setDescription
Sets the description of this playlist item.- Parameters:
description- The new description for this item.
-
getTitle
- Returns:
- Title of the item. This is displayed inside of the player prior to playback, as well as in the visual playlist. This can be hidden with the PlayerConfig.setDisplayTitle() option.
-
getDescription
- Returns:
- Short description of the item. It is displayed below the title. This can be hidden with the PlayerConfig.setDisplayDescription() option.
-
getFile
- Returns:
- The media file for this playlist item.
-
getImage
- Returns:
- Poster image URL. Displayed before and after playback.
-
getMediaId
- Returns:
- Unique identifier of this item. Used by advertising, analytics and discovery services.
-
getFeedId
- Returns:
- Unique identifier of this item. Used by related/recommendation services.
-
getRecommendations
- Returns:
- URL to a feed that contains related items for a particular playlist item.
-
getStartTime
- Returns:
- URL to a feed that contains related items for a particular playlist item.
-
getDuration
- Returns:
- the display duration for the item set in seconds
-
getSources
- Returns:
- Used for quality toggling and alternate sources.
-
getTracks
- Returns:
- Include captions, chapters, and thumbnails for media.
-
getAdSchedule
- Returns:
- Schedule advertising for a specific media file.
-
getVMAPSchedule
- Returns:
- Either a local, remote URL of the vmap file, or a VMAP (XML) string.
-
getMediaDrmCallback
- Returns:
- DRM callback instance -- used for Widevine DRM.
-
getDrmConfig
- Returns:
- DRM config
-
getUserInfo
public JSONObject getUserInfo()- Returns:
- User Info that will be sent to Chromecast receiver (aside from Studio DRM info)
-
getHttpHeaders
- Returns:
- HTTP Headers to include with requests for this media file.
-
getImaDaiSettings
- Returns:
- The IMA DAI settings for this playlist item
-
getExternalMetadata
- Returns:
- The External Metadata for this playlist Item
-
getLiveSyncDuration
public double getLiveSyncDuration()Returns the target live sync duration in seconds for live streams.When configured, this controls how far behind the live edge the player targets during playback. A higher value increases the buffer between the player and the live edge, which can help with caption synchronization and other processing that needs more time.
Use case: Live streams with captions that require additional processing time. Setting this to 10-15 seconds gives caption decoders enough lead time to stay in sync, rather than relying on the player's default proximity to the live edge.
Risks and considerations:
- Higher values increase the delay between the live broadcast and what the viewer sees. For latency-sensitive content (sports, auctions, interactive events), this trade-off should be carefully evaluated.
- This setting overrides any target offset hints provided by the stream manifest
(e.g., HLS
EXT-X-SERVER-CONTROL). If the manifest specifies an optimized offset, this value will take precedence. - Only affects live stream playback. This value is ignored for VOD content.
- Very low values (near the 5-second minimum) may cause buffering on poor network conditions since there is less buffer between the player and the live edge.
- Returns:
- The target offset in seconds behind the live edge, or 0 if not set (player uses its default behavior).
- See Also:
-
describeContents
public int describeContents() -
writeToParcel
public void writeToParcel(Parcel dest, int flags)
-