AdStreamManagerDelegate
@objc(AASDKAdStreamManagerDelegate)
public protocol AdStreamManagerDelegate
The AdStreamManagerDelegate protocol defines the methods used to retrieve information about ads and companion banners inserted server-side.
-
Notifies when an ad stream is about to start playing.
Declaration
Swift
func adStreamManager(_ adstreamManager: AdStreamManager, willStartPlaying url: URL)Parameters
adstreamManagerowner
urlthe URL to play from
-
An ad break was detected.
Declaration
Swift
func adStreamManager(_ adstreamManager: AdStreamManager, adBreakStarted manager: AdManager)Parameters
adstreamManagerowner
managerthe ad manager object that will handle the ad break
-
Notifies of changes in the ad stream manager.
Declaration
Swift
func adStreamManager(_ adstreamManager: AdStreamManager, stateChanged state: MediaPlayerStatus)Parameters
adstreamManagerowner
statethe current state of the player playing the stream
-
An ad break has ended.
Declaration
Swift
func adStreamManager(_ adstreamManager: AdStreamManager, adBreakEnded manager: AdManager)Parameters
adstreamManagerowner
managerthe ad manager object that managed the ad break
-
Metadata has changed in the player.
Declaration
Swift
func adStreamManager(_ adstreamManager: AdStreamManager, metadataChanged metadata: [AVMetadataItem])Parameters
adstreamManagerowner
metadatathe data that changed
-
The ad stream is about to reconnect if the ad break was skipped or another ad was inserted in the ad break, and thus the stream has shifted.
Declaration
Swift
func adStreamManagerWillReconnect(_ adstreamManager: AdStreamManager)Parameters
adstreamManagerowner
-
Called when the stream is played with an external player and the
AdStreamManagerdecides to pause content. When this gets called, you should pause the stream content.Declaration
Swift
func adStreamManagerPlayerShouldPause(_ adstreamManager: AdStreamManager)Parameters
adstreamManagerowner
-
Called when the stream is played with an external player and the
AdStreamManagerdecides to resume content. When this gets called, you should resume the stream content.Declaration
Swift
func adStreamManagerPlayerShouldResume(_ adstreamManager: AdStreamManager)Parameters
adstreamManagerowner
-
Notifies when the ad stream has downloaded the DVR metadata. May be nil which suggests that an error occured.
Declaration
Swift
@objc optional func adStreamManager(_ adstreamManager: AdStreamManager, didReceive dvrMetadata: AdStreamDVRMetadata?)Parameters
adstreamManagerowner
dvrMetadatametadata for stream