JWImaAdvertisingConfigBuilder
@objcMembers
public class JWImaAdvertisingConfigBuilder : NSObject, JWBuilder
Used to build a JWAdvertisingConfig object to play ads using the IMA client.
-
Declaration
Swift
public typealias Output = JWAdvertisingConfig -
Builds an advertising config based off the settings provided.
Throws
throws An error if the config is not setup properly.Declaration
Swift
public func build() throws -> JWAdvertisingConfig -
Sets a VMAP URL.
Declaration
Swift
@discardableResult public func vmapURL(_ vmapURL: URL) -> JWImaAdvertisingConfigBuilderParameters
vmapURLEither a local or remote URL of the vmap file.
Return Value
The builder, so setters can be chained.
-
Sets an array of
JWAdBreakobjects that provide info about ad breaks.Declaration
Swift
@discardableResult public func schedule(_ schedule: [JWAdBreak]) -> JWImaAdvertisingConfigBuilderParameters
scheduleAn array of
JWAdBreakobjects that provide information about ad breaks.Return Value
The builder, so setters can be chained.
-
Sets the URL of the VAST tag.
Note
Can also specify the VAST VMAP file to use for ad breaks.Declaration
Swift
@discardableResult @objc public func tag(_ tag: URL) -> JWImaAdvertisingConfigBuilderParameters
tagThe URL of the VAST tag.
Return Value
The builder, so setters can be chained.
-
Sets the rules for how often a user sees ads while watching the video content.
Declaration
Swift
@discardableResult public func adRules(_ adRules: JWAdRules) -> JWImaAdvertisingConfigBuilderParameters
adRulesDefines playback rules for the scheduled ads.
Return Value
The builder, so setters can be chained.
-
The container with obstructions that should be marked as friendly.
Note
The viewability measurement may be affected if obstructions above the player view are not registered properly.Note
If the friendly obstructions array is modified, it will be registered until the next ad schedule is loaded or the current playlist item is replayed.See also
FriendlyObstructionsContainer.swiftDeclaration
Swift
@discardableResult public func friendlyObstructionsContainer(_ container: JWFriendlyObstructionsContainer) -> JWImaAdvertisingConfigBuilderReturn Value
The builder, so setters can be chained.
-
The Google IMA SDK settings.
Declaration
Swift
@discardableResult public func imaSettings(_ imaSettings: JWImaSettings) -> JWImaAdvertisingConfigBuilderReturn Value
The builder, so setters can be chained.
JWImaAdvertisingConfigBuilder Class Reference