SCAdFacadeDelegate

@protocol SCAdFacadeDelegate <NSObject>

The SCAdFacadeDelegate protocol needs to be implemented by the video player implementation it receives it´s commands and delivers information through this protocol

  • if you use customizableClickThroughAlert, add this function

    Declaration

    Objective-C

    - (void)displayClickThroughAlert;
  • The player should load the ad from this url and is told to disable/enable seeking

    Declaration

    Objective-C

    - (BOOL)loadAdWithUrlString:(NSString *_Nonnull)urlString
                 disableSeeking:(BOOL)disableSeeking
                     completion:(nullable SCEmptyCompletionBlock)completion;
  • The player should start its playback

    Declaration

    Objective-C

    - (void)startPlayback;
  • The player should pause its playback

    Declaration

    Objective-C

    - (void)pausePlayback;
  • The player is being asked if it is paused

    Declaration

    Objective-C

    - (BOOL)isPaused;
  • The player should mute sound

    Declaration

    Objective-C

    - (void)mutePlayer;
  • The player should unmute sound

    Declaration

    Objective-C

    - (void)unmutePlayer;
  • The player is being asked if it is muted

    Declaration

    Objective-C

    - (BOOL)isMuted;
  • The player should seek from its current position to a time offset

    Declaration

    Objective-C

    - (void)seek:(NSInteger)offset;
  • The player must give back its current playback position

    Declaration

    Objective-C

    - (double)getCurrentTime;
  • The player must give back the duration of its current video

    Declaration

    Objective-C

    - (double)getDuration;
  • Not used at the moment

    Declaration

    Objective-C

    - (NSString *_Nullable)getVideoElement;
  • The player should set its volume to the desired value (unused at the moment)

    Declaration

    Objective-C

    - (void)setVolume:(id)volume;
  • The player should give back the current volume (currently unused)

    Declaration

    Objective-C

    - (id)getVolume;
  • The player should lock the current content source

    Declaration

    Objective-C

    - (void)lockContent;
  • The player should give back its current content source

    Declaration

    Objective-C

    - (NSString *_Nullable)getCurrentContentSource;
  • The player should release its source to the content source (after an adSlot is finished)

    Declaration

    Objective-C

    - (BOOL)releaseContent;
  • Callback function that is being called for every single event

    Declaration

    Objective-C

    - (void)onEventCallback:(SCAdEvent *_Nonnull)event;
  • Give back an error, if a playback error occured

    Declaration

    Objective-C

    - (nullable NSString *)getError;
  • If your player is connected to the sequencer it should ask the sequencer for the adInfo and give it back

    Declaration

    Objective-C

    - (void)getAdInfo:(SCAdInfoCompletionBlock _Nonnull)completion;
  • Click through happened, pass it on to the view controller

    Declaration

    Objective-C

    - (void)displayClickThroughAlert:(id)alert;
  • Visibility of the adView changed, so pause or resume the player

    Declaration

    Objective-C

    - (void)onVisibilityChanged:(BOOL)visible;
  • Skip an ad

    Declaration

    Objective-C

    - (void)skipAd;
  • If your player is connected to the sequencer it should ask the sequencer for the adError object, if an error was detected

    Declaration

    Objective-C

    - (void)getAdError:(SCAdErrorCompletionBlock _Nonnull)completion;
  • The player should load the ad from these urls when captions have been detected and is told to disable/enable seeking

    Declaration

    Objective-C

    - (BOOL)loadAdWithCaptions:(NSDictionary *_Nonnull)loadDict
                disableSeeking:(BOOL)disableSeeking
                    completion:(nullable SCEmptyCompletionBlock)completion;
  • Give back the current player frame and viewMode (normal or fullscreen)

    Declaration

    Objective-C

    - (nullable SCElementSize *)getPlayerSize;
  • Give back the frame of the viewPort and the viewMode (normal or fullscreen)

    Declaration

    Objective-C

    - (nullable SCElementSize *)getViewportSize;