ATVAd
@interface ATVAd : NSObject <NSCopying>
Represent one ad break.
-
VAST 2 URL
Declaration
Objective-C
@property (readonly, nonatomic) NSURL *vastUrl;Swift
var vastUrl: URL! { get } -
When will this ad break plays (unit: second)
Declaration
Objective-C
@property (readonly, nonatomic) unsigned long offset;Swift
var offset: UInt { get } -
Whether this ad break is played by ATVVideoPlayer
Declaration
Objective-C
@property (assign, readwrite, nonatomic) BOOL isPlayed;Swift
var isPlayed: Bool { get set } -
Ad title from vast response
Declaration
Objective-C
@property (readwrite, copy, nonatomic) NSString *adTitle;Swift
var adTitle: String! { get set } -
Ad description from vast response
Declaration
Objective-C
@property (readwrite, copy, nonatomic) NSString *adDescription;Swift
var adDescription: String! { get set } -
Please use the other init methods.
Declaration
Objective-C
- (instancetype)init; -
Create a midroll ad break.
Declaration
Objective-C
- (id)initMidRollWithVastUrl:(NSURL *)vastUrl offset:(unsigned long)offset;Swift
init!(midRollWithVastUrl vastUrl: URL!, offset: UInt)Parameters
vastUrlVAST 2 XML URL
offsetwhen will this ad break plays (unit: second)
Return Value
midroll ad break
-
Create a preroll ad break.
Declaration
Objective-C
- (id)initPreRollWithVastUrl:(NSURL *)vastUrl;Swift
init!(preRollWithVastUrl vastUrl: URL!)Parameters
vastUrlVAST 2 XML URL
Return Value
preroll ad break
-
Create a postroll ad break.
Declaration
Objective-C
- (id)initPostRollWithVastUrl:(NSURL *)vastUrl;Swift
init!(postRollWithVastUrl vastUrl: URL!)Parameters
vastUrlVAST 2 XML URL
Return Value
postroll ad break
-
Description for this object.
Useful for debugging.
Declaration
Objective-C
- (NSString *)description;Swift
func description() -> String!Return Value
description with attributes’ values
-
Copy object.
Declaration
Objective-C
- (id)copyWithZone:(NSZone *)zone;Swift
func copy(with zone: NSZone!) -> Any!Parameters
zoneThis parameter is ignored. Memory zones are no longer used by Objective-C.
Return Value
a new instance that’s a copy of the receiver
ATVAd Class Reference