SCAdSlotController

@interface SCAdSlotController : NSObject <SCPlayerEventListener>

The SCAdSlotController initializes and controls a single AdSlot. A valid SCAdSlotController must be inialized from the SCAdSessionController.

  • Readonly version of the SCAdConfiguration

    Declaration

    Objective-C

    @property (nonatomic, readonly) SCAdConfiguration *_Nonnull configuration;
  • Register your adController as SCAdSlotControllerDelegate

    Declaration

    Objective-C

    @property (nonatomic, weak) id<SCAdListener> _Nullable adListener;
  • You start the playback of an ad slot with this function

    Declaration

    Objective-C

    - (void)startAdSlotWith:(nonnull SCAdConfiguration *)configuration;
  • You start the playback of VMAP playlist with this function

    Declaration

    Objective-C

    - (void)startVMAPWith:(nonnull SCAdConfiguration *)configuration;
  • Call this function to stop a VMAP playlist

    Declaration

    Objective-C

    - (void)stopAdPlaylist;
  • Call this function if you want to stop and active adSlot (before it ends by itself)

    Declaration

    Objective-C

    - (void)stopAdSlot;
  • Call this function if you want to skip an adSlot

    Declaration

    Objective-C

    - (void)skipAd;
  • Cleanup after usage!

    Declaration

    Objective-C

    - (void)cleanup;
  • Callback function for the video player that must be called for certain player events

    Declaration

    Objective-C

    - (void)playerEventCallbackWith:(SCAdPlayerEventType)playerEventType;
  • 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 when the user taps on the adView and clickthrough is active

    Declaration

    Objective-C

    - (void)onClickThrough;
  • Add your adView for visibility checks with this function

    Declaration

    Objective-C

    - (void)addVisibilityCheckerForView:(id)adView;
  • Register any view, that covers your adView but belongs to your ad playback views (like soundButton, replayButton etc.)

    Declaration

    Objective-C

    - (void)registerFriendlyViews:(nonnull NSMutableArray *)friendlyViews;
  • Call this function if you want to pause playback

    Declaration

    Objective-C

    - (void)pausePlayback;
  • Call this function if you want to start playback

    Declaration

    Objective-C

    - (void)startPlayback;
  • Call this function if you want to resume playback

    Declaration

    Objective-C

    - (void)resumePlayback;
  • Add views that belong to the player (like soundbuttons etc.) and should not be registered as views that cover the adView

    Declaration

    Objective-C

    - (void)setFriendlyViews:(nonnull NSMutableArray *)friendlyViews;
  • Call this function, if while streaming an ad the player stops due to an empty buffer

    Declaration

    Objective-C

    - (void)onBufferEmpty;
  • Call this function, if the player can continue after the buffer was empty and is able to play on now

    Declaration

    Objective-C

    - (void)onBufferRefilled;
  • Call this function for a detailed adError error description

    Declaration

    Objective-C

    - (void)getAdError:(nonnull SCAdErrorCompletionBlock)completion;
  • Call this function if the loading of the adTag succeeded

    Declaration

    Objective-C

    - (void)loadAdSuccess;
  • Call this function if the loading of the adTag failed

    Declaration

    Objective-C

    - (void)loadAdFailure;
  • Call this function to unmute the adPlayer

    Declaration

    Objective-C

    - (void)unmutePlayer;
  • Call this function to mute the adPlayer

    Declaration

    Objective-C

    - (void)mutePlayer;
  • Call this function to check if the player currently is muted

    Declaration

    Objective-C

    - (BOOL)isMuted;
  • Call this function to receive the currentClickThroughURL as string

    Declaration

    Objective-C

    - (void)clickTroughURL:(nonnull SCStringResultCompletionBlock)completion;
  • Call this function when your video player has changed its size

    Declaration

    Objective-C

    - (void)resize;