SCAdSlotController
@interface SCAdSlotController : NSObject
The SCAdSlotController initializes and controls a single AdSlot. A valid AdSlot must be inialized from the SCAdSessionController.
-
Register your SCAdListener here as the delegate of the SCAdSlotController
Declaration
Objective-C
@property (nonatomic, weak) id<SCAdListener> _Nullable delegate;
-
Because the SCAdSlotController holds the AVPlayer, you call this function to start playback of your content video
Declaration
Objective-C
- (void)playContentVideoWith:(nonnull NSString *)url;
-
You start the playback of an ad slot with this function
Declaration
Objective-C
- (void)startAdSlotWith:(nonnull SCAdConfiguration *)configuration;
-
Call this function if you leave your view controller while video (or advertisement) playback is still active
Declaration
Objective-C
- (void)stopAdSlot;
-
Cleanup after usage!
Declaration
Objective-C
- (void)cleanup;
-
Call this function when the user has pushed the skip button
Declaration
Objective-C
- (void)skipAd;
-
Call this function for a more detailed adInfo
Declaration
Objective-C
- (void)getAdInfo:(nonnull SCAdInfoCompletionBlock)completion;
-
Call this function for a more detailed adInfo
Declaration
Objective-C
- (void)getPublicAdSlot:(nonnull SCPublicAdSlotCompletionBlock)completion;
-
Call this function for a more detailed error description
Declaration
Objective-C
- (void)getAdError:(nonnull SCAdErrorCompletionBlock)completion;
-
Returns the current time of the current video
Declaration
Objective-C
- (double)getCurrentTime;
-
Returns the duration of the current video
Declaration
Objective-C
- (double)getDuration;