THEOAdDescription

@available(*, deprecated, message: "This class will be removed with the next major release.")
@objc(THEOplayerTHEOAdDescription)
public class THEOAdDescription : NSObject, _AdDescription, Codable

A THEOplayerAdDescription object contains a description of an advertisement that will be added to the player.

  • The ad integration.

    Declaration

    Swift

    public var integration: AdIntegration?
  • The ad Integration.

    Declaration

    Swift

    @objc(integration)
    public var integration_Objc: AdIntegration { get set }
  • src

    The ‘src’ property represents the source of the ad (VAST/VMAP). The player will download the content available at the URL and will schedule the specified advertisement(s).

    Remark

    Currently, the THEO ad integration supports VAST and VMAP files.*

    Declaration

    Swift

    @objc
    public var src: URL
  • Specifies when an ad should be played in the content video.

    Remark

    • A number for the offset in seconds.
    • ‘start’ for a preroll.
    • ‘end’ for a postroll.
    • ‘HH:MM:SS.mmm’ for a timestamp in the playback window.
    • A percentage string (XX%) for a proportion of the content duration.
    • Only use this property for VAST-files. THEOplayer will ignore this value for VMAP-files, because they already have their own offset.

    Declaration

    Swift

    @objc
    public var timeOffset: String?
  • Specifies when a linear ad can be skipped.

    Remark

    • A number for the offset in seconds.
    • ‘HH:MM:SS.mmm’ for a timestamp in the playback window of the advertisement.
    • A percentage string (XX%) for a proportion of the ad duration.

    Declaration

    Swift

    @objc
    public var skipOffset: String?
  • Constructs a THEOAdDescription.

    Declaration

    Swift

    @objc
    public init(src: String, timeOffset: String? = nil, skipOffset: String? = nil)

    Parameters

    src

    The source of the ad.

    timeOffset

    Specifies when an ad should be played in the content video. Defaults to nil.

    skipOffset

    Specifies at which point the remainder of the ad can be skipped. Defaults to nil.