AdPodInfo

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 functions

Int

Returns the position of the ad within the pod.

Double

Returns the maximum duration of the pod in seconds.

Int

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

Double

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

Int

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

Boolean

Returns true if the ad is a bumper ad.

Public functions

getAdPosition

fun getAdPosition(): Int

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

fun getMaxDuration(): Double

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

getPodIndex

fun getPodIndex(): Int

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

fun getTimeOffset(): Double

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

fun getTotalAds(): Int

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

fun isBumper(): Boolean

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