-
- All Implemented Interfaces:
-
com.brightcove.ssai.timeline.block.TimelineBlock
public class AdBlock implements TimelineBlock
A timeline block representing an Ad.
-
-
Method Summary
Modifier and Type Method Description long
getDuration()
Gets the duration of the block in milliseconds. long
getAbsoluteOffset()
Gets the absolute Block offset in milliseconds, that is,the offset with respect to the total video length (content + ads). long
getRelativeOffset()
Gets the relative Block offset in milliseconds, that is,the offset with respect to the content length only (no Ads). boolean
isAd()
Specify if the block is an Ad. AdPod
getAdPod()
If isAd returns true, use this method to get additional information about theAd Pod. boolean
isDynamic()
Returns whether the Timeline block is dynamic or not. void
updateDuration(long duration)
Updates the duration of this block. void
updateAbsoluteOffset(long absoluteOffset)
Updates the absolute offset of this block. void
updateRelativeOffset(long relativeOffset)
Updates the relative offset of this block. void
updateAdPod(@NonNull() AdPod adPod)
Updates the AdPod of this block. String
toString()
-
-
Method Detail
-
getDuration
long getDuration()
Gets the duration of the block in milliseconds.
-
getAbsoluteOffset
long getAbsoluteOffset()
Gets the absolute Block offset in milliseconds, that is,the offset with respect to the total video length (content + ads).
-
getRelativeOffset
long getRelativeOffset()
Gets the relative Block offset in milliseconds, that is,the offset with respect to the content length only (no Ads).
-
isAd
boolean isAd()
Specify if the block is an Ad.
-
getAdPod
@NonNull() AdPod getAdPod()
If isAd returns true, use this method to get additional information about theAd Pod.
-
isDynamic
boolean isDynamic()
Returns whether the Timeline block is dynamic or not.
Note: The default implementation returns false.
-
updateDuration
void updateDuration(long duration)
Updates the duration of this block.This block must only be updated when isDynamic returns true.
Note: The default implementation does nothing. It can be overridden to provide thedesired implementation.
- Parameters:
duration
- the new duration
-
updateAbsoluteOffset
void updateAbsoluteOffset(long absoluteOffset)
Updates the absolute offset of this block.This block must only be updated when isDynamic returns true.
Note: The default implementation does nothing. It can be overridden to provide thedesired implementation.
- Parameters:
absoluteOffset
- the new absolute offset
-
updateRelativeOffset
void updateRelativeOffset(long relativeOffset)
Updates the relative offset of this block.This block must only be updated when isDynamic returns true.
Note: The default implementation does nothing. It can be overridden to provide thedesired implementation.
- Parameters:
relativeOffset
- the new relative offset
-
updateAdPod
void updateAdPod(@NonNull() AdPod adPod)
Updates the AdPod of this block.This block must only be updated when isDynamic returns true.
Note: The default implementation does nothing. It can be overridden to provide thedesired implementation.
- Parameters:
adPod
- the new AdPod
-
-
-
-