AdManagerInterstitialEventDatasource
@objc(AASDKAdManagerInterstitialEventDatasource)
public protocol AdManagerInterstitialEventDatasource
@protocol
The AdManagerInterstitialEventDatasource
protocol defines the methods used to provide AdswizzSDK with various data during a livestream ad replacement.
-
Called when the
AdManager
is preparing all ads during the.prepare()
call and theAdManagerSettings
contains anadInterstitialEventMonitor
reference. Use it for the livestream ad-replacement scenario to customize the mediafile URL for each ad in the ad pod during the associatedAVPlayerInterstitialEvent
. For each ad in the ad pod, theAdManager
will receive your (custom) media file URLs and use them internally to identify and match the appropriateAVPlayerItem
instances handled by theinterstitialPlayer
(AVQueuePlayer). Therefore, you should pass the URL which was used to build the associatedAVPlayerItem
before passing them as templateItems when building theAVPlayerInterstitialEvent
.By default, the
AdManager
expects that theAVPlayerItem
s use and load the MediaFiles from the VAST response. Implementing this method is not required, e.g if your scheduledAVPlayerInterstitialEvent
uses the ad’s MediaFiles from the VAST response.Important: Note that the
AdManager
will not observe theAVPlayerItem
s from theinterstitialPlayer
(AVQueuePlayer) if it detects a mismatch between the URL you provide here and the URL used to create theAVPlayerItem
itself. In this case, theAdManager
will not initiate any tracking and will not emit any Ad Events for the respectiveAdData
.Declaration
Parameters
adManager
The AdManager that sent the event
ad
The AdData for which the event was sent
Return Value
the URL which was used in the template AVPlayerItem when the AVPlayerInterstitialEvent is constructed