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 content video fails for any reason
Declaration
Objective-C
- (void)contentVideoError:(NSError *_Nonnull)error;
-
if you use customizableClickThroughAlert, add this function
Declaration
Objective-C
- (void)displayClickThroughAlert;
-
The player detected a change of the presentationSize of the current AVPlayerItem
Declaration
Objective-C
- (void)presentationSizeChangedTo:(id)newSize;
-
Return your environmentVars object (only needed for VMAP implementations)
Declaration
Objective-C
- (nullable SCAdEnvironment *)getEnvironmentVarsWith: (NSString *_Nonnull)adBreakType;
-
Called on for every ScAdInfo type change
Declaration
Objective-C
- (void)onEventCallback:(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;
-
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;