SmartclipSDKiOS 3.0.0
Smartclip Advertisement Framework for iOS
SCPlayerEventListener.h
1//
2// SCPlayerEventListener.h
3// SmartclipSDKiOS
4//
5// Copyright © 2019 smartclip. All rights reserved.
6//
7
8#import <Foundation/Foundation.h>
9
10NS_ASSUME_NONNULL_BEGIN
12
14typedef void (^SCPublicAdSlotCompletionBlock)(SCPublicAdSlot* _Nullable adInfo);
16typedef void (^SCAdErrorCompletionBlock)(SCAdError* _Nullable adError);
18typedef void (^SCAdInfoCompletionBlock)(SCAdInfo* _Nullable adInfo);
19
20
22@protocol SCPlayerEventListener <NSObject>
24- (void)playerEventCallbackWith:(SCAdPlayerEventType)playerEventType;
26- (void)getAdInfo:(SCAdInfoCompletionBlock _Nonnull )completion;
28- (void)getAdError:(SCAdErrorCompletionBlock _Nonnull )completion;
30- (void)getPublicAdSlot:(SCPublicAdSlotCompletionBlock _Nonnull )completion;
32- (void)onClickThrough;
34- (void)onBufferEmpty;
36- (void)onBufferRefilled;
38- (void)loadAdSuccess;
40- (void)loadAdFailure;
42- (void)stopAdSlot;
44- (void)resize;
45
46@optional
50- (void)contentVideoError:(NSError*)error;
51@end
52
53NS_ASSUME_NONNULL_END
This class holds public error information, if an adError was detected.
Definition: SCAdError.h:14
This class holds the advertisement information.
Definition: SCAdInfo.h:14
This class holds public progress information about the adSlot.
Definition: SCPublicAdSlot.h:15
Use this protocol to inform the adSlotController about player related events.
Definition: SCPlayerEventListener.h:22
void onBufferRefilled()
Inform the adSlotController about a refilled player buffer (needed for OMID)
void loadAdFailure()
Inform the adSlotController about an unsuccessfull ad video load.
void stopAdSlot()
Request stopping the current ad slot (if you leave your viewController during ad playback for example...
void onClickThrough()
Inform the adSlotController about a clickThrough.
void onBufferEmpty()
Inform the adSlotController about an empty player buffer (needed for OMID)
void loadAdSuccess()
Inform the adSlotController about a successfull ad video load.
void resize()
Call when presentationSize of the player changes.
void contentVideoFinished()
Call when contentVideo has finished.