Class AdPod

java.lang.Object
com.brightcove.ssai.ad.AdPod

public class AdPod extends Object
A representation of an Ad pod. An Ad pod is a sequenced group of Ads.
  • Method Details

    • empty

      public static AdPod empty()
      Creates an Ad pod with a empty list of AdBreaks.
      Returns:
      the ad pod
    • isEmpty

      public boolean isEmpty()
      Returns true if this AdPod contains no AdBreaks.
      Returns:
      Returns true if this AdPod contains no AdBreaks
    • create

      public static AdPod create(long relativeStartPosition)
      Creates an Ad pod with a empty list of AdBreaks.
      Parameters:
      relativeStartPosition - the relative start position
      Returns:
      the ad pod
    • create

      public static AdPod create(long relativeStartPosition, @NonNull Deque<AdBreak> adBreaks)
      Creates an Ad pod with a given list of AdBreaks.
      Parameters:
      relativeStartPosition - the relative start position
      adBreaks - the ad breaks
      Returns:
      the ad pod
    • getAdBreakList

      public Collection<AdBreak> getAdBreakList()
      Gets the Ad break list.
      Returns:
      the ad break list
    • addAdBreak

      public void addAdBreak(AdBreak adBreak)
      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

      @Nullable public AdBreak getAdBreakAt(long absolutePosition)
      Gets ad break at a given absolute position.
      Parameters:
      absolutePosition - the absolute position
      Returns:
      the ad break at
    • getAdAt

      @Nullable public Ad<?> getAdAt(long absolutePosition)
      Gets ad at a given absolute position.
      Parameters:
      absolutePosition - the absolute position
      Returns:
      the ad at given absolutePosition.