JWAdRulesBuilder
@objcMembers
public class JWAdRulesBuilder : NSObject, JWBuilder
The builder for JWAdRules.
-
Declaration
Swift
public typealias Output = JWAdRules
-
Sets the advertising rules relevant to the JWPlayer advertising client.
Declaration
Swift
@discardableResult public func jwRules(startOn: UInt, frequency: UInt, timeBetweenAds: UInt, startOnSeek: JWAdShownOnSeek) -> JWAdRulesBuilder
Parameters
startOn
The first playlist item that will allow ad playback, index starting at 1.
frequency
Play ads only on every X playlist item. i.e. frequency 3 means only play ads every third playlist item. Use 0 to only play ads on the first playlist item.
timeBetweenAds
The minimum amount of time (in seconds) that needs to pass before the viewer is served another ad.
startOnSeek
Indicates which ad (if any) should play if playback starts by seeking.
Return Value
The builder.
-
Sets the advertising rules relevant to the IMA advertising client.
Declaration
Swift
@discardableResult public func imaRules(startOn: UInt, frequency: UInt) -> JWAdRulesBuilder
Parameters
startOn
The first playlist item that will allow ad playback, index starting at 1.
frequency
Play ads only on every X playlist item. i.e. frequency 3 means only play ads every third playlist item. Use 0 to only play ads on the first playlist item.
Return Value
The builder.