AdPodcastManagerDelegate
@objc(AASDKAdPodcastManagerDelegate)
public protocol AdPodcastManagerDelegate
The AdPodcastManagerDelegate protocol defines the methods used to get information about ads and companion banners inserted during podcast playback.
-
Notifies when a podcast is about to start playing.
Declaration
Swift
func adPodcastManager(_ adPodcastManager: AdPodcastManager, willStartPlaying url: URL)Parameters
adPodcastManagerowner
urlurl where to play from
-
Notifies when a podcast encountered an error while attempting to play.
Declaration
Swift
func adPodcastManager(_ adPodcastManager: AdPodcastManager, didFailPlaying url: URL, error: Error)Parameters
adPodcastManagerowner
errorthe error that occurred
urlthe podcast URL that produced the error
-
Notifies when a podcast has loaded the ads and an
AdManagerhas been created to handle the ad breaks. Note that there is no need to keep a strong reference to the ad manager, however, you can set adelegateandinteractiveDelegatefor specificAdManagerevents.Declaration
Swift
func adPodcastManager(_ adPodcastManager: AdPodcastManager, didReceive manager: AdManager)Parameters
adPodcastManagerowner
managerad manager object that will handle the ad breaks
-
Notifies of changes in the podcast player status.
Declaration
Swift
func adPodcastManager(_ adPodcastManager: AdPodcastManager, stateChanged state: MediaPlayerStatus)Parameters
adPodcastManagerowner
statecurrent state of the player playing the podcast
-
Notifies of changes in the podcast player playhead.
Declaration
Swift
func adPodcastManager(_ adPodcastManager: AdPodcastManager, playheadChanged playhead: TimeInterval, duration: TimeInterval)Parameters
adPodcastManagerowner
playheadcurrent playhead of the player playing the podcast
durationtotal duration of the current player playing the podcast
-
Called when the podcast is played with an external player and the
AdswizzAdPodcastManagerdecides to pause content. When this gets called. you should pause the podcast content.Declaration
Swift
func adPodcastManagerPlayerShouldPause(_ adPodcastManager: AdPodcastManager)Parameters
adPodcastManagerowner
-
Called when the podcast is played with an external player and the
AdswizzAdPodcastManagerdecides to resume content. When this gets called, you should resume the podcast content.Declaration
Swift
func adPodcastManagerPlayerShouldResume(_ adPodcastManager: AdPodcastManager)Parameters
adPodcastManagerowner
-
Called when the podcast is played with an external player and the
AdswizzAdPodcastManagerdetects a skipped ad. When this gets called, you should seek to thetimerelative to the podcast duration as suggested by theAdswizzAdPodcastManager. When your player completes the seek operation, call the specified completion block back to the SDK.Declaration
Swift
func adPodcastManagerPlayer(_ adPodcastManager: AdPodcastManager, shouldSeekTo time: TimeInterval, completion: @escaping () -> Void)Parameters
adPodcastManagerowner
timethe time to seek in seconds, relative to the podcast duration
completionthe completion block back to the SDK once the seek operation has completed