Package com.brightcove.ssai.ad
Class AdPod
java.lang.Object
com.brightcove.ssai.ad.AdPod
A representation of an Ad pod. An Ad pod is a sequenced group of Ads.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddAdBreak(AdBreak adBreak) Adds an Ad break.static AdPodcreate(long relativeStartPosition) Creates an Ad pod with a empty list ofAdBreaks.static AdPodCreates an Ad pod with a given list ofAdBreaks.static AdPodempty()Creates an Ad pod with a empty list ofAdBreaks.longGets the absolute end position.longGets the absolute start position.Ad<?>getAdAt(long absolutePosition) Gets ad at a given absolute position.getAdBreakAt(long absolutePosition) Gets ad break at a given absolute position.Gets the Ad break list.longGets the total Ad pod duration.longGets the relative start position.booleanisEmpty()
-
Method Details
-
empty
Creates an Ad pod with a empty list ofAdBreaks.- Returns:
- the ad pod
-
isEmpty
public boolean isEmpty()- Returns:
- Returns true if this AdPod contains no AdBreaks
-
create
Creates an Ad pod with a empty list ofAdBreaks.- Parameters:
relativeStartPosition- the relative start position- Returns:
- the ad pod
-
create
Creates an Ad pod with a given list ofAdBreaks.- Parameters:
relativeStartPosition- the relative start positionadBreaks- the ad breaks- Returns:
- the ad pod
-
getAdBreakList
Gets the Ad break list.- Returns:
- the ad break list
-
addAdBreak
Adds an Ad break.- Parameters:
adBreak- the ad break
-
getRelativeStartPosition
public long getRelativeStartPosition()Gets the relative start position.- Returns:
- the relative start position
-
getAbsoluteStartPosition
public long getAbsoluteStartPosition()Gets the absolute start position.- Returns:
- the start position
-
getAbsoluteEndPosition
public long getAbsoluteEndPosition()Gets the absolute end position.- Returns:
- the end position
-
getDuration
public long getDuration()Gets the total Ad pod duration.- Returns:
- the duration
-
getAdBreakAt
Gets ad break at a given absolute position.- Parameters:
absolutePosition- the absolute position- Returns:
- the ad break at
-
getAdAt
Gets ad at a given absolute position.- Parameters:
absolutePosition- the absolute position- Returns:
- the ad at given absolutePosition.
-