AdsConfiguration

@available(*, deprecated, message: "This class will be removed in future releases.")
@objc(THEOplayerAdsConfiguration)
public class AdsConfiguration : NSObject, Encodable

The advertisement configuration of the player.

  • Whether an advertisement duration countdown will be shown in the UI.

    Remark

    • Defaults to true.

    Declaration

    Swift

    @objc
    public private(set) var showCountdown: Bool { get }
  • The preload type of the ad, whether media files of mid- and postrolls are preloaded.

    Remark

    • Defaults to MIDROLL_AND_POSTROLL.

    Declaration

    Swift

    @objc
    public private(set) var preload: AdPreloadType { get }
  • The configuration of the Google Interactive Media Ads.

    Declaration

    Swift

    @available(*, deprecated, message: "This property will be removed in future releases. Configuration for Google IMA is moved to `THEOplayerGoogleIMAIntegration`.")
    @objc
    public var googleIma: GoogleIMAAdsConfiguration
  • The configuration of Google Dynamic Ad Insertion.

    Declaration

    Swift

    @available(*, deprecated, message: "This property will be removed in future releases. Configuration for Google DAI is moved to `THEOplayerGoogleIMAIntegration`.")
    @objc
    public let googleDai: GoogleDAIAdsConfiguration?
  • Constructs an AdsConfiguration object.

    Declaration

    Swift

    @objc
    public init(showCountdown: Bool, preload: AdPreloadType, googleIma: GoogleIMAAdsConfiguration? = nil, googleDai: GoogleDAIAdsConfiguration? = nil)

    Parameters

    showCountdown

    Whether an advertisement duration countdown will be shown in the UI, defaults to true.

    preload

    The preload type of the ad, whether media files of mid- and postrolls are preloaded, defaults to MIDROLL_AND_POSTROLL.

    googleIma

    The configuration of the Google Interactive Media Ads, defaults to nil.

    googleDai

    The configuration of Google Dynamic Ad Insertion, defaults to nil.