CSJFullScreenInterstitialAdView.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //
  2. // CSJFullScreenInterstitialAdView.h
  3. // CSJAdSDK
  4. //
  5. // Created by bytedance on 2020/12/24.
  6. //
  7. #import <UIKit/UIKit.h>
  8. #import "CSJPlayerPublicDefine.h"
  9. @class CSJMaterialMeta;
  10. @class CSJAdSlot;
  11. @class CSJFullScreenInterstitialAdView;
  12. @class CSJVideoAdView;
  13. /// 插屏事件代理
  14. @protocol CSJFullScreenInterstitialAdDelegate <NSObject>
  15. @optional
  16. /** -----------点击关闭、dislike、logo事件回调----------- */
  17. /// 点击关闭按钮
  18. - (void)fullScreenInterstitialAdViewDidTapCloseButton:(CSJFullScreenInterstitialAdView * _Nonnull)interstitialAdView;
  19. /// 点击dislike面板
  20. - (void)fullScreenInterstitialAdViewDidTapDislikeButton:(CSJFullScreenInterstitialAdView *_Nonnull)interstitialAdView;
  21. /// 点击logo
  22. - (void)fullScreenInterstitialAdViewDidTapLogoImageView:(CSJFullScreenInterstitialAdView *_Nonnull)interstitialAdView;
  23. /// 点击下载bar,只有横屏样式有下载bar
  24. - (void)fullScreenInterstitialAdView:(CSJFullScreenInterstitialAdView *_Nonnull)interstitialAdView downloadBarTapped:(id _Nullable )sender extraDic:(NSDictionary *_Nullable)extraDic;
  25. /// 点击下载按钮,竖版样式的下载按钮
  26. - (void)fullScreenInterstitialAdView:(CSJFullScreenInterstitialAdView *_Nonnull)interstitialAdView downloadButtonTapped:(id _Nullable )sender extraDic:(NSDictionary *_Nullable)extraDic;
  27. /// 整个广告的点击事件
  28. - (void)fullScreenInterstitialAdViewDidClick:(CSJFullScreenInterstitialAdView *_Nonnull)interstitialAdView extraDic:(NSDictionary *_Nullable)extraDic;
  29. /// 插屏比例,视频准备播放
  30. - (void)fullScreenInterstitialAdPlayerReadyToPlay:(CSJFullScreenInterstitialAdView *_Nonnull)interstitialAdView;
  31. /// 插屏比例,视频播放完成
  32. - (void)fullScreenInterstitialAdPlayerDidPlayFinish:(CSJFullScreenInterstitialAdView *_Nonnull)interstitialAdView;
  33. /// 插屏比例,视频加载失败
  34. - (void)fullScreenInterstitialAdView:(CSJFullScreenInterstitialAdView *_Nonnull)interstitialAdView videoDidLoadFailWithError:(NSError *_Nullable)error;
  35. /// 插屏比例,视频view点击事件
  36. - (void)fullScreenInterstitialAdVideoViewDidClick:(CSJFullScreenInterstitialAdView *_Nonnull)interstitialAdView;
  37. /// 插屏比例,视频状态回调
  38. - (void)fullScreenInterstitialAdView:(CSJFullScreenInterstitialAdView *_Nonnull)interstitialAdView videoStateDidChanged:(BUPlayerPlayState)playerState;
  39. /** -----------全屏图片点击事件回调----------- */
  40. /// 由 SDK 端上控制的可点击区域,默认图片、icon、CTA button、描述等服务端下发的物料 都可以点击进行跳转回调
  41. - (void)fullScreenImageAdDidClick:(CSJFullScreenInterstitialAdView *_Nonnull)interstitialAdView extraDic:(NSDictionary *_Nullable)extraDic;
  42. @end
  43. NS_ASSUME_NONNULL_BEGIN
  44. @interface CSJFullScreenInterstitialAdView : UIView
  45. @property (nonatomic, weak) id<CSJFullScreenInterstitialAdDelegate> intersitialDelegate;
  46. - (CSJVideoAdView *)interstitialPlayer;
  47. + (instancetype)fullScreenInterstitialAdViewWithMaterial:(CSJMaterialMeta *)materialMeta adSlot:(CSJAdSlot *)adSlot;
  48. @end
  49. NS_ASSUME_NONNULL_END