SCAdSequencer
@interface SCAdSequencer : NSObject
SCAdSequencer: use this class in combination with the SCAdSlot class to define your sequence of adSlots. if the user scrubs the content video and thus overscrubs an adSlot the sequnecer gives you the possibility to reinsert those slots.
-
EnvironmentVars for all adSlots, can be changed anytime if you want different settings for different slots
Declaration
Objective-C
@property (nonatomic, strong) SCAdEnvironment *_Nonnull environmentVars;
-
Delegate that conforms to the SCAdSequencerDelegate protocol Most likely your ViewController
Declaration
Objective-C
@property (nonatomic, weak) id<SCAdSequencerDelegate> _Nullable delegate;
-
Default initializer
Declaration
Objective-C
- (nonnull instancetype)initWithAVPlayer:(id)avPlayer adSlots:(nonnull NSMutableArray *)adSlots contentUrl:(nonnull NSString *)contentURL environmentVars: (nonnull SCAdEnvironment *)environmentVars;
-
Start the sequencer with this function
Declaration
Objective-C
- (void)startSequencer;
-
Stop the sequencer with this function
Declaration
Objective-C
- (void)stopSequencer;
-
Call this function for a more detailed adInfo
Declaration
Objective-C
- (void)getAdInfo:(nonnull SCAdInfoCompletionBlock)completion;
-
Get your publicAdSlot object here
Declaration
Objective-C
- (void)getPublicAdSlot:(nonnull SCPublicAdSlotCompletionBlock)completion;
-
Call this function for a detailed error description
Declaration
Objective-C
- (void)getAdError:(nonnull SCAdErrorCompletionBlock)completion;
-
Call this function when the user has pushed the skip button
Declaration
Objective-C
- (void)skipAd;
-
Call this function when you leave your viewController and don´t need the sequencer any more
Declaration
Objective-C
- (void)cleanup;
-
Returns the current time of the current clip
Declaration
Objective-C
- (double)getCurrentClipTime;
-
Returns the duration of the current clip
Declaration
Objective-C
- (double)getCurrentClipDuration;