SCAdController
@interface SCAdController : NSObject
The SCAdController encapsulates video playback for the outstream use case
-
Set the SCAdListener delegate here
Declaration
Objective-C
@property (nonatomic, weak) id<SCAdListener> _Nullable delegate;
-
Initialize this controller with your session state listener
Declaration
Objective-C
- (nonnull instancetype)initWithSessionStateListener: (nonnull id<SCAdSessionStateListener>)sessionStateListener;
-
Set the adContentView
Declaration
Objective-C
- (void)setContentView:(nonnull SCAdContentView *)contentView;
-
Call this function to start an adSlot with a certain configuration
Declaration
Objective-C
- (void)startAdSlotWith:(nonnull SCAdConfiguration *)configuration;
-
Call this function to stop an adSlot before it is finished by itself
Declaration
Objective-C
- (void)stopAdSlot;
-
Get your detailed adInfo object here
Declaration
Objective-C
- (void)getAdInfo:(nonnull SCAdInfoCompletionBlock)completion;
-
Get a detailed adError description here
Declaration
Objective-C
- (void)getAdError:(nonnull SCAdErrorCompletionBlock)completion;
-
Get your publicAdSlot object here
Declaration
Objective-C
- (void)getPublicAdSlot:(nonnull SCPublicAdSlotCompletionBlock)completion;
-
Pause playback of the ad
Declaration
Objective-C
- (void)pausePlayback;
-
Start playback of the ad
Declaration
Objective-C
- (void)startPlayback;
-
Find out if playback is currently paused.
Declaration
Objective-C
- (BOOL)isPaused;