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
adstreamManager
owner
url
the URL to play from
-
An ad break was detected.
Declaration
Swift
func adStreamManager(_ adstreamManager: AdStreamManager, adBreakStarted manager: AdManager)
Parameters
adstreamManager
owner
manager
the 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
adstreamManager
owner
state
the current state of the player playing the stream
-
An ad break has ended.
Declaration
Swift
func adStreamManager(_ adstreamManager: AdStreamManager, adBreakEnded manager: AdManager)
Parameters
adstreamManager
owner
manager
the ad manager object that managed the ad break
-
Metadata has changed in the player.
Declaration
Swift
func adStreamManager(_ adstreamManager: AdStreamManager, metadataChanged metadata: [AVMetadataItem])
Parameters
adstreamManager
owner
metadata
the 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
adstreamManager
owner
-
Called when the stream is played with an external player and the
AdStreamManager
decides to pause content. When this gets called, you should pause the stream content.Declaration
Swift
func adStreamManagerPlayerShouldPause(_ adstreamManager: AdStreamManager)
Parameters
adstreamManager
owner
-
Called when the stream is played with an external player and the
AdStreamManager
decides to resume content. When this gets called, you should resume the stream content.Declaration
Swift
func adStreamManagerPlayerShouldResume(_ adstreamManager: AdStreamManager)
Parameters
adstreamManager
owner
-
Notifies when the ad stream has downloaded the DVR metadata.
Declaration
Swift
@objc optional func adStreamManager(_ adstreamManager: AdStreamManager, didReceive dvrMetadata: DVRMetadata?)
Parameters
adstreamManager
owner
dvrMetadata
metadata for stream