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
SDKErroror a specificAVPlayererror. (e.g by checking theNSErrorcode such asNSURLErrorTimedOut,NSURLErrorFileDoesNotExist)Declaration
Parameters
adManagerThe AdManager where the error originated
adThe ad which caused the error
errorThe 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
adManagerThe AdManager that sent the event
adThe ad that is being played
playHeadThe current position of the play head. Should be in the interval [0..duration].
durationThe total duration of the ad media as reported by the internal SDK player.