BUNativeExpressAdViewDelegate.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. //
  2. // BUNativeExpressAdViewDelegate.h
  3. // BUAdSDK
  4. //
  5. // Created by Rush.D.Xzj on 2020/10/12.
  6. // Copyright © 2020 bytedance. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "BUMaterialMeta.h"
  10. NS_ASSUME_NONNULL_BEGIN
  11. @class BUNativeExpressAdManager;
  12. @class BUNativeExpressAdView;
  13. @class BUDislikeWords;
  14. @protocol BUNativeExpressAdViewDelegate <NSObject>
  15. @optional
  16. /**
  17. * Sent when views successfully load ad
  18. */
  19. - (void)nativeExpressAdSuccessToLoad:(BUNativeExpressAdManager *)nativeExpressAdManager views:(NSArray<__kindof BUNativeExpressAdView *> *)views;
  20. /**
  21. * Sent when views fail to load ad
  22. */
  23. - (void)nativeExpressAdFailToLoad:(BUNativeExpressAdManager *)nativeExpressAdManager error:(NSError *_Nullable)error;
  24. /**
  25. * This method is called when rendering a nativeExpressAdView successed, and nativeExpressAdView.size.height has been updated
  26. */
  27. - (void)nativeExpressAdViewRenderSuccess:(BUNativeExpressAdView *)nativeExpressAdView;
  28. /**
  29. * This method is called when a nativeExpressAdView failed to render
  30. */
  31. - (void)nativeExpressAdViewRenderFail:(BUNativeExpressAdView *)nativeExpressAdView error:(NSError *_Nullable)error;
  32. /**
  33. * Sent when an ad view is about to present modal content
  34. */
  35. - (void)nativeExpressAdViewWillShow:(BUNativeExpressAdView *)nativeExpressAdView;
  36. /**
  37. * Sent when an ad view is clicked
  38. */
  39. - (void)nativeExpressAdViewDidClick:(BUNativeExpressAdView *)nativeExpressAdView;
  40. /**
  41. Sent when a playerw playback status changed.
  42. @param playerState : player state after changed
  43. */
  44. - (void)nativeExpressAdView:(BUNativeExpressAdView *)nativeExpressAdView stateDidChanged:(BUPlayerPlayState)playerState;
  45. /**
  46. * Sent when a player finished
  47. * @param error : error of player
  48. */
  49. - (void)nativeExpressAdViewPlayerDidPlayFinish:(BUNativeExpressAdView *)nativeExpressAdView error:(NSError *)error;
  50. /**
  51. * Sent when a user clicked dislike reasons.
  52. * @param filterWords : the array of reasons why the user dislikes the ad
  53. */
  54. - (void)nativeExpressAdView:(BUNativeExpressAdView *)nativeExpressAdView dislikeWithReason:(NSArray<BUDislikeWords *> *)filterWords;
  55. /**
  56. * Sent after an ad view is clicked, a ad landscape view will present modal content
  57. */
  58. - (void)nativeExpressAdViewWillPresentScreen:(BUNativeExpressAdView *)nativeExpressAdView;
  59. /**
  60. This method is called when another controller has been closed.
  61. @param interactionType : open appstore in app or open the webpage or view video ad details page.
  62. */
  63. - (void)nativeExpressAdViewDidCloseOtherController:(BUNativeExpressAdView *)nativeExpressAdView interactionType:(BUInteractionType)interactionType;
  64. /**
  65. This method is called when the Ad view container is forced to be removed.
  66. @param nativeExpressAdView : Ad view container
  67. */
  68. - (void)nativeExpressAdViewDidRemoved:(BUNativeExpressAdView *)nativeExpressAdView;
  69. @end
  70. NS_ASSUME_NONNULL_END