SCAdFacadeDelegate
@protocol SCAdFacadeDelegate <NSObject>
The SCAdFacadeDelegate protocol needs to be implemented by the video player implementation it receives its commands and delivers information through this protocol
-
if you use customizableClickThroughAlert, add this function
Declaration
Objective-C
- (void)displayClickThroughAlert; -
if you want to support subtitles (captions), implement this function in addition to the normal loadAdWithUrlString function (see below)
Declaration
Objective-C
- (BOOL)loadAdWithCaptions:(NSDictionary *_Nonnull)loadDict disableSeeking:(BOOL)disableSeeking completion:(nullable SCEmptyCompletionBlock)completion; -
this function is required for VMAP, but not needed for pure VAST
Declaration
Objective-C
- (nullable SCAdEnvironment *)getEnvironmentVarsWith: (NSString *_Nonnull)adBreakType; -
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 should resume its playback
Declaration
Objective-C
- (void)resumePlayback; -
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; -
Start content playback with this playerController
Declaration
Objective-C
- (void)playContentVideoWith:(NSURL *_Nonnull)url; -
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; -
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; -
return AVPlayer
Declaration
Objective-C
- (id)getAVPlayer; -
set eventListener
Declaration
Objective-C
- (void)setEventListener:(id<SCPlayerEventListener> _Nonnull)listener; -
set playerListener
Declaration
Objective-C
- (void)setPlayerListener:(id<SCAdListener> _Nonnull)listener; -
cleanup
Declaration
Objective-C
- (void)cleanup;
SCAdFacadeDelegate Protocol Reference