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;
  • Call this function to receive the currentClickThroughURL as string

    Declaration

    Objective-C

    - (void)clickTroughURL:(nonnull SCStringResultCompletionBlock)completion;
  • Call this function when you display the ViewController that contains this SCAdSlotController to help visibility checking

    Declaration

    Objective-C

    - (void)activate:(BOOL)isActive;