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
adPodcastManager
owner
url
url 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
adPodcastManager
owner
error
the error that occurred
url
the podcast URL that produced the error
-
Notifies when a podcast has loaded the ads and an
AdManager
has 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 adelegate
andinteractiveDelegate
for specificAdManager
events.Declaration
Swift
func adPodcastManager(_ adPodcastManager: AdPodcastManager, didReceive manager: AdManager)
Parameters
adPodcastManager
owner
manager
ad 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
adPodcastManager
owner
state
current 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
adPodcastManager
owner
playhead
current playhead of the player playing the podcast
duration
total duration of the current player playing the podcast
-
Called when the podcast is played with an external player and the
AdswizzAdPodcastManager
decides to pause content. When this gets called. you should pause the podcast content.Declaration
Swift
func adPodcastManagerPlayerShouldPause(_ adPodcastManager: AdPodcastManager)
Parameters
adPodcastManager
owner
-
Called when the podcast is played with an external player and the
AdswizzAdPodcastManager
decides to resume content. When this gets called, you should resume the podcast content.Declaration
Swift
func adPodcastManagerPlayerShouldResume(_ adPodcastManager: AdPodcastManager)
Parameters
adPodcastManager
owner
-
Called when the podcast is played with an external player and the
AdswizzAdPodcastManager
detects a skipped ad. When this gets called, you should seek to thetime
relative 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
adPodcastManager
owner
time
the time to seek in seconds, relative to the podcast duration
completion
the completion block back to the SDK once the seek operation has completed