lpw
2024-06-28 07b050f6654a7c5f7a07887a8b8746f3adf85235
commit | author | age
aea85e 1 //
H 2 //  WAAdProxy.h
3 //  WASdkIntfUI
4 //
5 //  Created by hank on 2017/8/15.
6 //  Copyright © 2017年 GHW-T-01. All rights reserved.
7 //
8
9 #import <Foundation/Foundation.h>
10 #import <UIKit/UIKit.h>
11
12 typedef NS_ENUM(NSInteger, WAAdCancelType) {
13     WAAdCancelTypePlayBefore = 0, // 播放前取消(播放前提示页面)
14     WAAdCancelTypePlaying,        // 播放过程中取消
15     WAAdCancelTypePlayAfter,      // 播放后取消(下载页面取消)
16 };
17
18 /** 广告激励视频代理 */
19 @protocol WAAdRewardedVideoDelegate <NSObject>
20
21 /*!
22  @abstract 显示视频前页面成功时回调
8913df 23  @param campaignId 活动Id
H 24  @param adSetId 广告Id
aea85e 25  @param rewarded 奖励物品
H 26  @param rewardedCount 奖励物品数量
27  @param extInfo CP扩展字段
28  */
29 - (void) adPreDisplayRewardedVideoWithCampaignId:(NSString *)campaignId
30                                            adSetId:(NSString *)adSetId
31                                           rewarded:(NSString *)rewarded
32                                      rewardedCount:(NSInteger)rewardedCount
33                                            extInfo:(NSString *)extInfo;
34
35 /*!
36  @abstract 点击叉按钮后回调
8913df 37  @param campaignId 活动Id
H 38  @param adSetId 广告Id
aea85e 39  @param process WAAdCancelTypePlayBefore 播放前取消,WAAdCancelTypePlaying 播放过程中取消, WAAdCancelTypeAfter 播放后取消(下载页面取消)
H 40  @param extInfo CP扩展字段
41  */
42 - (void) adDidCancelRewardedVideoWithCampaignId:(NSString *)campaignId
43                                        adSetId:(NSString *)adSetId
44                                        process:(WAAdCancelType)process
45                                        extInfo:(NSString *)extInfo;
46
47 /*!
48  @abstract 加载视频失败回调
8913df 49  @param campaignId 活动Id
H 50  @param adSetId 广告Id
aea85e 51  @param extInfo CP扩展字段
H 52  */
53 - (void) adDidFailToLoadRewardedVideoWithCampaignId:(NSString *)campaignId
54                                            adSetId:(NSString *)adSetId
55                                            extInfo:(NSString *)extInfo;
56
57 /*!
58  @abstract 播放视频结束回调
8913df 59  @param campaignId 活动Id
H 60  @param adSetId 广告Id
aea85e 61  @param rewarded 奖励物品
H 62  @param rewardedCount 奖励物品数量
63  @param extInfo CP扩展字段
64  */
65 - (void) adDidDisplayRewardedVideoWithCampaignId:(NSString *)campaignId
66                                         adSetId:(NSString *)adSetId
67                                        rewarded:(NSString *)rewarded
68                                   rewardedCount:(NSInteger)rewardedCount
69                                         extInfo:(NSString *)extInfo;
70
71 /*!
72  @abstract 播放完视频点击回调
8913df 73  @param campaignId 活动Id
H 74  @param adSetId 广告Id
aea85e 75  @param rewarded 奖励物品
H 76  @param rewardedCount 奖励物品数量
77  @param extInfo CP扩展字段
78  */
79 - (void) adDidClickRewardedVideoWithCampaignId:(NSString *)campaignId
80                                       adSetId:(NSString *)adSetId
81                                      rewarded:(NSString *)rewarded
82                                 rewardedCount:(NSInteger)rewardedCount
83                                       extInfo:(NSString *)extInfo;
84
85 @end
86
87 /** 视频广告缓存完代理 */
88 @protocol WAAdRewardedVideoCachedDelegate <NSObject>
89
90 /*!
91  @abstract 视频广告缓存完成回调
92  @param cacheCount 可用广告数量
93  */
94 - (void)adDidRewardedVideoCachedWithCacheCount:(NSInteger)cacheCount;
95
96 @end
97
98 @interface WAAdProxy : NSObject
99
100 /** 加载广告 */
101 + (void)loadAd;
102
8913df 103 /*!
H 104  @abstract 设置视频广告缓存完回调
105  @param delegate WAAdRewardedVideoCachedDelegate代理
106  */
aea85e 107 + (void)setWAAdRewardedVideoCachedDelegate:(id<WAAdRewardedVideoCachedDelegate>)delegate;
H 108
8913df 109 /*!
H 110  @abstract 检测可播放广告数量
111  */
aea85e 112 + (NSInteger) checkRewardedVideo;
H 113
8913df 114 /*!
H 115  @abstract 显示广告
116  @param extInfo CP扩展字段
117  @param delegate WAAdRewardedVideoDelegate代理
118  */
aea85e 119 + (void) displayRewardedVideoWithExtInfo:(NSString *)extInfo delegate:(id<WAAdRewardedVideoDelegate>)delegate;
H 120
121 @end