public interface TimelineBlock
Modifier and Type | Method and Description |
---|---|
long |
getAbsoluteOffset()
Gets the absolute Block offset in milliseconds, that is,
the offset with respect to the total video length (content + ads).
|
AdPod |
getAdPod()
If
isAd() returns true, use this method to get additional information about the
Ad Pod. |
long |
getDuration()
Gets the duration of the block in milliseconds.
|
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.
|
default boolean |
isDynamic()
Returns whether the Timeline block is dynamic or not.
|
default void |
updateAbsoluteOffset(long absoluteOffset)
Updates the absolute offset of this block.
|
default void |
updateAdPod(AdPod adPod)
Updates the
AdPod of this block. |
default void |
updateDuration(long duration)
Updates the duration of this block.
|
default void |
updateRelativeOffset(long relativeOffset)
Updates the relative offset of this block.
|
long getDuration()
long getAbsoluteOffset()
long getRelativeOffset()
boolean isAd()
@NonNull AdPod getAdPod()
isAd()
returns true, use this method to get additional information about the
Ad Pod.default boolean isDynamic()
Note: The default implementation returns false.
default void updateDuration(long duration)
isDynamic()
returns true.
Note: The default implementation does nothing. It can be overridden to provide the desired implementation.
duration
- the new durationdefault void updateAbsoluteOffset(long absoluteOffset)
isDynamic()
returns true.
Note: The default implementation does nothing. It can be overridden to provide the desired implementation.
absoluteOffset
- the new absolute offsetdefault void updateRelativeOffset(long relativeOffset)
isDynamic()
returns true.
Note: The default implementation does nothing. It can be overridden to provide the desired implementation.
relativeOffset
- the new relative offsetdefault void updateAdPod(@NonNull AdPod adPod)
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 the desired implementation.
adPod
- the new AdPod