AdPodInfo

public interface AdPodInfo


An ad may be part of a pod of ads. This object exposes metadata related to that pod, such as the number of ads in the pod and the ad position within the pod.

Summary

Public methods

abstract int

Returns the position of the ad within the pod.

abstract double

Returns the maximum duration of the pod in seconds.

abstract int

Client side and DAI VOD: Returns the index of the ad pod.

abstract double

Returns the content time offset at which the current ad pod was scheduled.

abstract int

Returns the total number of ads contained within this pod, including bumpers.

abstract boolean

Returns true if the ad is a bumper ad.

Public methods

getAdPosition

abstract int getAdPosition()

Returns the position of the ad within the pod. The value returned is one-based, for example, 1 of 2, 2 of 2, etc. If the ad is not part of a pod, this will return 1.

getMaxDuration

abstract double getMaxDuration()

Returns the maximum duration of the pod in seconds. For unknown duration, -1 is returned.

getPodIndex

abstract int getPodIndex()

Client side and DAI VOD: Returns the index of the ad pod. For a preroll pod, returns 0. For midrolls, returns 1, 2,...,N. For a postroll pod, returns -1. Defaults to 0 if this ad is not part of a pod, or this pod is not part of a playlist. DAI live stream: Returns the index of the ad pod. For a preroll pod, returns 0. For midrolls, returns the break ID. Returns -2 if pod index cannot be determined (internal error).

getTimeOffset

abstract double getTimeOffset()

Returns the content time offset at which the current ad pod was scheduled. For preroll pod, 0 is returned. For midrolls, the scheduled time is returned in seconds. For postroll, -1 is returned. Defaults to 0 if this ad is not part of a pod, or the pod is not part of an ad playlist.

getTotalAds

abstract int getTotalAds()

Returns the total number of ads contained within this pod, including bumpers. If the ad is not part of a pod, this will return 1.

isBumper

abstract boolean isBumper()

Returns true if the ad is a bumper ad. If the ad is not part of a pod, this returns false.