GoogleDAI

public protocol GoogleDAI

Represents information regarding content with dynamically inserted advertisements.

  • Whether snapback is enabled.

    Declaration

    Swift

    var snapback: Bool { get set }
  • Converts stream time (including ads) to content time (excluding ads). For livestreams no conversion is done and the stream time parameter is returned.

    Declaration

    Swift

    func contentTime(from streamTime: Double) -> Double

    Parameters

    streamTime

    The point in time of your stream including ads.

    Return Value

    The point in time of your content without ads.

  • Converts content time (excluding ads) to stream time (including ads) For livestreams no conversion is done and the content time parameter is returned.

    Declaration

    Swift

    func streamTime(from contentTime: Double) -> Double

    Parameters

    contentTime

    The point in time of your content without ads.

    Return Value

    The point in time of your stream including ads.

  • Requests whether snapback is enabled.

    Declaration

    Swift

    @available(*, deprecated, message: "This method will be removed with the next major release. Please use snapback instead.")
    func requestSnapBack(completionHandler: @escaping (Bool?, Error?) -> Void)

    Parameters

    completionHandler

    A closure to invoke when the operation completes or fails.

  • Enable/disable snapback.

    Declaration

    Swift

    @available(*, deprecated, message: "This method will be removed with the next major release. Please use snapback instead.")
    func setSnapBack(_ newValue: Bool, completionHandler: ((Bool?, Error?) -> Void)?)

    Parameters

    completionHandler

    An optional closure to invoke when the operation completes or fails.