AdBreak

public protocol AdBreak

Represnts an Ad Break

  • The ad position of the ad break

    Declaration

    Swift

    var position: AdPosition { get }
  • Start time of the ad break

    Declaration

    Swift

    var startTime: TimeInterval { get }
  • Duration of the ad break

    Declaration

    Swift

    var duration: TimeInterval { get }
  • Number of ads with the ad break

    Declaration

    Swift

    var totalAds: Int { get }
  • Maintaining the current adBreak is played or not.

    Declaration

    Swift

    var isPlayed: Bool { get set }
  • timeRange Extension method
  • equal(other:) Extension method

    Checking current AdBreak instance property with other AdBreak instance

    Note

    avoiding Equatable protocol or else we have to use AdBreak type confirmation as like any AdBreak eg: var adBreak: (any AdBreak)?

    Declaration

    Swift

    func equal(
        other adBreak: AdBreak
    ) -> Bool
  • equalExceptTotalAds(other:) Extension method

    Undocumented

    Declaration

    Swift

    func equalExceptTotalAds(other adBreak: AdBreak) -> Bool
  • isWithinRange(at:) Extension method

    Determines if the ad break contains the specified playhead time.

    Declaration

    Swift

    func isWithinRange(at playhead: TimeInterval) -> Bool