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 AdStreamManager object as identifiable.

    Declaration

    Swift

    @objc
    public let objectId: UUID
  • Optional delegate for the ad stream manager. See the AdStreamManagerDelegate interface for more details.

    Declaration

    Swift

    @objc
    public weak var delegate: AdStreamManagerDelegate?
  • AdStreamManager settings. See AdStreamManagerSettings for 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) throws

    Parameters

    url

    remote stream URL to buffer

  • Start playing a stream at the url.

    Declaration

    Swift

    @objc
    open func play(with url: URL) throws

    Parameters

    url

    stream 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()
  • Undocumented

    Declaration

    Swift

    open var hasDVR: Bool { get }
  • Reimplement this in derived class. It passes the metadata identified in the stream.

    Declaration

    Swift

    open func didReceive(metadata: [AVMetadataItem])

    Parameters

    metadata

    metadata in the stream

  • An ad break was detected in the stream.

    Declaration

    Swift

    open func adBreakDetected(of duration: TimeInterval, for adId: String?)

    Parameters

    duration

    duration of the adBreak

    adId

    possible adId for the adBreak

  • Undocumented

    Declaration

    Swift

    override open func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?)