ADCDN_FullscreenExpressVideoAdManager.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. //
  2. // ADCDN_FullscreenExpressVideoAdManager.h
  3. // ADCDN
  4. //
  5. // Created by 吃不胖的瘦子 on 2021/2/23.
  6. // Copyright © 2021 llh. All rights reserved.
  7. // 全屏视频广告(非激励视频)
  8. #import <Foundation/Foundation.h>
  9. #import <UIKit/UIKit.h>
  10. NS_ASSUME_NONNULL_BEGIN
  11. @class ADCDN_FullscreenExpressVideoAdManager;
  12. /**
  13. * 代理协议方法
  14. */
  15. @protocol ADCDN_FullscreenExpressVideoAdManagerDelegate <NSObject>
  16. /**
  17. * 加载成功
  18. */
  19. - (void)ADCDN_FullscreenVideoAdDidLoad:(ADCDN_FullscreenExpressVideoAdManager *)fullscreenVideoAd;
  20. /**
  21. * 加载失败
  22. */
  23. - (void)ADCDN_FullscreenVideoAd:(ADCDN_FullscreenExpressVideoAdManager *)fullscreenVideoAd didFailWithError:(NSError *_Nullable)error;
  24. /**
  25. * 下载成功
  26. */
  27. -(void)ADCDN_FullscreenVideoAdDidDownLoadVideo:(ADCDN_FullscreenExpressVideoAdManager *)fullscreenVideoAd;
  28. /**
  29. * 点击广告
  30. */
  31. - (void)ADCDN_FullscreenVideoAdDidClick:(ADCDN_FullscreenExpressVideoAdManager *)fullscreenVideoAd;
  32. /**
  33. * 曝光回调
  34. */
  35. - (void)ADCDN_FullscreenVideoAdDidBecomeVisible:(ADCDN_FullscreenExpressVideoAdManager *)fullscreenVideoAd;
  36. /**
  37. * 视频播放完成
  38. */
  39. - (void)ADCDN_FullscreenVideoAdDidPlayFinish:(ADCDN_FullscreenExpressVideoAdManager *)fullscreenVideoAd didFailWithError:(NSError *_Nullable)error;
  40. /**
  41. * 播放完成点击关闭
  42. */
  43. - (void)ADCDN_FullscreenVideoAdDidClose:(ADCDN_FullscreenExpressVideoAdManager *)fullscreenVideoAd;
  44. /**
  45. * 视频广告点击跳过
  46. This method is called when the user clicked skip button.
  47. */
  48. - (void)ADCDN_FullscreenVideoAdDidClickSkip:(ADCDN_FullscreenExpressVideoAdManager *)fullscreenVideoAd;
  49. @end
  50. @interface ADCDN_FullscreenExpressVideoAdManager : NSObject
  51. /** 代理对象 */
  52. @property (nonatomic, weak, nullable) id<ADCDN_FullscreenExpressVideoAdManagerDelegate>delegate;
  53. /** 控制器(必传) */
  54. @property (nonatomic, weak) UIViewController * rootViewController;
  55. /**
  56. * plcId - 广告位 ID
  57. */
  58. -(instancetype _Nullable)initWithPlcId:(NSString *_Nullable)plcId;
  59. /**
  60. * 加载广告
  61. */
  62. -(void)loadAd;
  63. /**
  64. 展示广告方法
  65. @param rootViewController 用于 present 激励视频 VC
  66. @return 是否展示成功
  67. 注:请在视频下载成功的回调之后执行此方法,才有效
  68. */
  69. - (BOOL)showAdFromRootViewController:(UIViewController *)rootViewController;
  70. @end
  71. NS_ASSUME_NONNULL_END