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 TypeMethodDescriptionvoid
addAdBreak
(AdBreak adBreak) Adds an Ad break.static AdPod
create
(long relativeStartPosition) Creates an Ad pod with a empty list ofAdBreak
s.static AdPod
Creates an Ad pod with a given list ofAdBreak
s.static AdPod
empty()
Creates an Ad pod with a empty list ofAdBreak
s.long
Gets the absolute end position.long
Gets 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.long
Gets the total Ad pod duration.long
Gets the relative start position.boolean
isEmpty()
-
Method Details
-
empty
Creates an Ad pod with a empty list ofAdBreak
s.- 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 ofAdBreak
s.- Parameters:
relativeStartPosition
- the relative start position- Returns:
- the ad pod
-
create
Creates an Ad pod with a given list ofAdBreak
s.- 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.
-