AdManagerDelegate
@objc(AASDKAdManagerDelegate)
public protocol AdManagerDelegate
@protocol
The AdManagerDelegate
protocol defines the methods used to retrieve information about ad playback (impression, quartiles, etc).
-
Called when there was an error playing the ad. Log the error and resume playing content. Note: evaluate the error by casting it to either
SDKError
or a specificAVPlayer
error. (e.g by checking theNSError
code such asNSURLErrorTimedOut
,NSURLErrorFileDoesNotExist
)Declaration
Parameters
adManager
The AdManager where the error originated
ad
The ad which caused the error
error
The error received
-
Called when the playhead for the internal player has changed on the current ad. It will also be called when the playhead positions itself on 0 or close to 0, immediately after the `.didStartPlaying’ event. The frequency of calling this function depends on how frequently the internal player is sending updates to the SDK. This usually happens at 1s intervals but you can expect more frequent updates if the player considers it necessary to do so.
Declaration
Parameters
adManager
The AdManager that sent the event
ad
The ad that is being played
playHead
The current position of the play head. Should be in the interval [0..duration].
duration
The total duration of the ad media as reported by the internal SDK player.