AI-generated Key Takeaways
-
The
AdBreakInfo.Builderclass is used to construct instances ofAdBreakInfo. -
You must provide the playback position in milliseconds when constructing a
Builder. -
Required fields when building an
AdBreakInfoinclude the playback position, ad break clip IDs, and the ad break's ID. -
The builder allows setting the duration, whether the break is embedded, and whether it has been watched.
-
The
build()method finalizes and returns theAdBreakInfoinstance.
A builder for AdBreakInfo.
Public Constructor Summary
|
Builder(long playbackPositionInMs)
Construct a
AdBreakInfo.Builder.
|
Public Method Summary
| AdBreakInfo |
build()
Builds an
AdBreakInfo
instance.
|
| AdBreakInfo.Builder | |
| AdBreakInfo.Builder |
setDurationInMs(long durationInMs)
Sets this break content’s duration in milliseconds.
|
| AdBreakInfo.Builder | |
| AdBreakInfo.Builder |
setIsEmbedded(boolean isEmbedded)
Set to
true if this break doesn't have a URL and is part of the
content.
|
| AdBreakInfo.Builder |
setIsWatched(boolean isWatched)
Set to
true if this break has been watched.
|
Inherited Method Summary
Public Constructors
public Builder (long playbackPositionInMs)
Construct a AdBreakInfo.Builder.
Parameters
| playbackPositionInMs | The content’s playback position in milliseconds at which the ad will begin playing. This is a required field. |
|---|
Public Methods
public AdBreakInfo build ()
Builds an AdBreakInfo
instance.
public AdBreakInfo.Builder setBreakClipIds (String[] breakClipIds)
Set an unmodifiable list of ad break clip IDs in this break. The list of matching
AdBreakClipInfo
objects can be obtained by calling MediaInfo.getAdBreakClips().
This is a required field.
public AdBreakInfo.Builder setDurationInMs (long durationInMs)
Sets this break content’s duration in milliseconds.
public AdBreakInfo.Builder setId (String id)
Sets the ad break's ID. This is a required field.
public AdBreakInfo.Builder setIsEmbedded (boolean isEmbedded)
Set to true if this break doesn't have a URL and is part of the
content.
public AdBreakInfo.Builder setIsWatched (boolean isWatched)
Set to true if this break has been watched.