SCAdListener
@protocol SCAdListener <NSObject>
Protocol that the video player uses to inform the listener about certain events.
-
Called when the content video has finished
Declaration
Objective-C
- (void)contentVideoFinished; -
Called when the AVPlayer actually starts video playback
Declaration
Objective-C
- (void)videoStartsPlayback; -
if you use customizableClickThroughAlert, add this function
Declaration
Objective-C
- (void)displayClickThroughAlert; -
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; -
The player detected a change of the presentationSize of the current AVPlayerItem
Declaration
Objective-C
- (void)presentationSizeChangedTo:(id)newSize; -
Called when the content video fails for any reason
Declaration
Objective-C
- (void)contentVideoError:(NSError *_Nonnull)error; -
Called on for every ScAdInfo type change
Declaration
Objective-C
- (void)onEventCallbackWithEvent:(SCAdEvent *_Nonnull)event; -
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)visibilityChanged:(BOOL)visible;
SCAdListener Protocol Reference