THEOAdDescription
@objc
public class THEOAdDescription : NSObject, AdDescription
A THEOplayerAdDescription
object contains a description of an advertisement that will be added to the player.
-
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). 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. Currently supports the following values: ‘start’, ‘end’, and percentages (string, e.g. ‘10%’).
Important
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. Value should be a percentage string, e.g. ‘10%’. This value overwrites the value specified in the VAST-files, unless the skipOffset would be higher than the duration of the ad video (e.g. 110%).
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
the optional time offset
skipOffset
the optional skip offset