AdStreamManager
@objc(AASDKAdStreamManager)
open class AdStreamManager : NSObject, Identifiable
The AdStreamManager supports playing a stream with either the internal player or an external player.
-
Identifier for the
AdStreamManagerobject asidentifiable.Declaration
Swift
@objc public let objectId: UUID -
Optional delegate for the ad stream manager. See the
AdStreamManagerDelegateinterface for more details.Declaration
Swift
@objc public weak var delegate: AdStreamManagerDelegate? -
AdStreamManagersettings. SeeAdStreamManagerSettingsfor possible options.Declaration
Swift
@objc public var adStreamManagerSettings: AdStreamManagerSettings -
Prepare a stream for playing. It will affect the internal player, which will start buffering.
Declaration
Swift
@objc open func prepare(with url: URL) throwsParameters
urlremote stream URL to buffer
-
Start playing a stream at the
url.Declaration
Swift
@objc open func play(with url: URL) throwsParameters
urlstream address
-
Stop the current stream.
Declaration
Swift
@objc open func stop() -
Pause the current stream.
Declaration
Swift
@objc open func pause() -
Resume the current stream.
Declaration
Swift
@objc open func resume() -
Reimplement this in derived class. It passes the metadata identified in the stream.
Declaration
Swift
open func didReceive(metadata: [AVMetadataItem])Parameters
metadatametadata in the stream
-
An ad break was detected in the stream.
Declaration
Swift
open func adBreakDetected(of duration: TimeInterval, for adId: String?)Parameters
durationduration of the adBreak
adIdpossible adId for the adBreak
-
Undocumented
Declaration
Swift
override open func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?)