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
AdManageris preparing all ads during the.prepare()call and theAdManagerSettingscontains anadInterstitialEventMonitorreference. 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, theAdManagerwill receive your (custom) media file URLs and use them internally to identify and match the appropriateAVPlayerIteminstances handled by theinterstitialPlayer(AVQueuePlayer). Therefore, you should pass the URL which was used to build the associatedAVPlayerItembefore passing them as templateItems when building theAVPlayerInterstitialEvent.By default, the
AdManagerexpects that theAVPlayerItems use and load the MediaFiles from the VAST response. Implementing this method is not required, e.g if your scheduledAVPlayerInterstitialEventuses the ad’s MediaFiles from the VAST response.Important: Note that the
AdManagerwill not observe theAVPlayerItems from theinterstitialPlayer(AVQueuePlayer) if it detects a mismatch between the URL you provide here and the URL used to create theAVPlayerItemitself. In this case, theAdManagerwill not initiate any tracking and will not emit any Ad Events for the respectiveAdData.Declaration
Parameters
adManagerThe AdManager that sent the event
adThe AdData for which the event was sent
Return Value
the URL which was used in the template AVPlayerItem when the AVPlayerInterstitialEvent is constructed