BBASMRewardedVideoInnerProtocol.h
3.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
//
// BBASMRewardedVideoInnerProtocol.h
// SWANAd
//
// Created by Bao,Shiwei on 2019/3/6.
// Copyright © 2019年 Baidu. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
typedef void(^BBAAdDialogButtonItemTapBlock)(void);
@protocol BBASMRewardedVideoInnerProtocol <NSObject>
/**
* @brief 执行Onload回调
*
*/
- (void)runOnLoad;
/**
* @brief 执行错误回调
*
* @param code 错误码
*/
- (void)runOnError:(NSString *)code;
/**
* @brief 执行关闭回调
*
* @param close 是否关闭
*/
- (void)runOnClose:(BOOL)close;
/**
* @brief 执行所有load成功回调
*
*/
- (void)runAllSuccCallBack;
/**
* @brief 执行所有load失败回调
*
* @param code 错误码
*/
- (void)runAllFailCallBackWithCode:(NSString *)code;
/**
* @brief 外置sd_webimage
*
* @param url 图片URL
* @param view view
*/
- (void)viewSetImageWithURL:(NSURL *)url view:(UIImageView *)view;
/**
* @brief 点击后弹出LP页
*
* @param url LP页URL
*/
- (void)showLPViewControllerWithURL:(NSURL *)url;
/**
* @brief 获取主页面,用于SKStore页面的跳转
*
* @return SWANPageStackController
*/
- (UIViewController *)getBBASMPageStackController;
/**
* @brief 将广告组件挂载到界面
*
* @param view 广告view
*/
- (void)addAdSubView:(UIView *)view;
/**
* @brief 是否是刘海屏
*
* @return 返回YES/NO
*/
- (BOOL)isFringeScreen;
/**
* @brief 播放器当前时间
*
* @return 时间
*/
- (NSTimeInterval)currentTime;
/**
* @brief 点击右上角弹窗
*
*/
- (void)showDialog:(int)rewardTime;
/**
* @brief 播放器静音控制
*
* @param silence 是否静音
*/
- (void)changeCurrentVideoSilencePlayer:(BOOL)silence;
/**
* @brief 暂停视频
*
*/
- (void)pauseRewardVideo;
/**
* @brief 播放视频
*
*/
- (void)replayRewardVideo;
/**
* @brief 强制横屏
*
*/
- (void)forceRotateToLandscapeRight;
/**
* @brief webview UA
*
*/
- (NSString *)getWebviewUserAgent;
/**
* @brief 播放结束
*
*/
- (void)playerDidEnd;
/**
* @brief 视频播放
*
*/
- (void)playerDidPlay;
/**
* @brief show方法succ回调
*
*/
- (void)runShowSucc;
- (void)runShowFail;
/**
* @brief 视频暂停
*
* @param over 是否暂停
* @param time 当前播放时间
*/
- (void)playerDidPause:(BOOL)over time:(NSTimeInterval)time;
/**
* @brief 播放器代理 更新左上角进度
*
* @param currentTime 当前时间
* @param duration 总时长
*/
- (void)videoPlayerUpdateTimeProgress:(double)currentTime
duration:(double)duration;
/**
* @brief event事件callback(二级回调)
*
* @param code 错误码
* @param event callback
*/
- (void)eventCallbackWithCode:(NSString *)code
event:(NSString *)event;
/**
* @brief 播放器启动通知
*
* @param over 结束
*/
- (void)playerDidPlaySuccess:(BOOL)over;
/**
* @brief 播放器失败
*
*/
- (void)playerDidFailed;
/**
* @brief 激励视频正常关闭
*
*/
- (void)setVideoEnd;
/**
* @brief 激励视频正常关闭
*
*/
- (void)setVideoSkip;
/**
* @brief 激励视频正常关闭
*
*/
- (void)vcClose;
- (NSString *)getSplashDidShowNcName;
- (NSString *)getSplashDidHideNcName;
- (void)showDialog:(NSString *)title
contentInfo:(NSString *)content
appId:(NSString *)appId
didLeftTapBlock:(BBAAdDialogButtonItemTapBlock)didLeftTapBlock
didRightTapBlock:(BBAAdDialogButtonItemTapBlock)didRightTapBlock;
@end