SmartclipSDKiOS 3.0.0
Smartclip Advertisement Framework for iOS
Loading...
Searching...
No Matches
SCAdSlotController.h
1//
2// SCAdSlotController.h
3// SmartclipSDKiOS
4//
5// Copyright © 2018 smartclip. All rights reserved.
6//
7
8#import <Foundation/Foundation.h>
9#import <UIKit/UIKit.h>
10#import <SmartclipSDKiOS/SCAdPlayerEvent.h>
11#import <SmartclipSDKiOS/SCPlayerEventListener.h>
12
14@protocol SCOmidEventLoggingDelegate, SCAdListener;
15
16NS_ASSUME_NONNULL_BEGIN
17
19typedef void (^SCStringResultCompletionBlock)(NSString* _Nullable result);
20
22typedef void (^SCEmptyCompletionBlock)(void);
23
26
28@property (nonatomic, readonly) SCAdConfiguration *configuration;
30@property (nonatomic, weak) id<SCAdListener> adListener;
31
36- (void)startAdSlotWith:(SCAdConfiguration*)configuration;
37
42- (void)startVMAPWith:(SCAdConfiguration*)configuration;
43
45- (void)stopAdPlaylist;
46
48- (void)stopAdSlot;
49
51- (void)skipAd;
52
54- (void)cleanup;
55
57- (void)playerEventCallbackWith:(SCAdPlayerEventType)playerEventType;
58
60- (void)getAdInfo:(SCAdInfoCompletionBlock)completion;
61
63- (void)getPublicAdSlot:(SCPublicAdSlotCompletionBlock)completion;
64
66- (void)onClickThrough;
67
69- (void)addVisibilityCheckerForView:(UIView*)adView;
70
72- (void)registerFriendlyViews:(NSMutableArray*)friendlyViews;
73
75- (void)pausePlayback;
76
78- (void)startPlayback;
79
81- (void)resumePlayback;
82
85- (void)setFriendlyViews:(NSMutableArray*)friendlyViews;
86
88- (void)onBufferEmpty;
89
92- (void)onBufferRefilled;
93
95- (void)getAdError:(SCAdErrorCompletionBlock)completion;
96
98- (void)setOmidEventLoggingDelegate:(id<SCOmidEventLoggingDelegate>)omidEventLogger;
99
101- (void)loadAdSuccess;
102
104- (void)loadAdFailure;
105
107- (void)unmutePlayer;
108
110- (void)mutePlayer;
111
113- (BOOL)isMuted;
114
119- (void)clickTroughURL:(SCStringResultCompletionBlock)completion;
120
122- (void)resize;
123@end
124
125NS_ASSUME_NONNULL_END
This class is used to configure the advertisement behavior.
Definition: SCAdConfiguration.h:30
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
The SCAdSlotController initializes and controls a single AdSlot. A valid SCAdSlotController must be i...
Definition: SCAdSlotController.h:25
id< SCAdListener > adListener
Register your adController as SCAdSlotControllerDelegate.
Definition: SCAdSlotController.h:30
void loadAdFailure()
Call this function if the loading of the adTag failed.
void unmutePlayer()
Call this function to unmute the adPlayer.
void startPlayback()
Call this function if you want to start playback.
void loadAdSuccess()
Call this function if the loading of the adTag succeeded.
SCAdConfiguration * configuration
Readonly version of the SCAdConfiguration.
Definition: SCAdSlotController.h:28
void onBufferEmpty()
Call this function, if while streaming an ad the player stops due to an empty buffer.
BOOL isMuted()
Call this function to check if the player currently is muted.
void stopAdSlot()
Call this function if you want to stop and active adSlot (before it ends by itself)
void cleanup()
Cleanup after usage!
void stopAdPlaylist()
Call this function to stop a VMAP playlist.
void pausePlayback()
Call this function if you want to pause playback.
void onClickThrough()
Call this function when the user taps on the adView and clickthrough is active.
void resumePlayback()
Call this function if you want to resume playback.
void skipAd()
Call this function if you want to skip an adSlot.
void mutePlayer()
Call this function to mute the adPlayer.
void resize()
Call this function when your video player has changed its size.
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