title: RewardedVideoAd

sidebar_label: RewardedVideoAd

Rewarded video ad component. This is a native component at a higher layer than normal components. A rewarded video ad is a singleton (a global singleton in Mini Games, and an intra-page singleton in Mini Programs where singleton objects cannot be used across pages), which is hidden by default, and you must call RewardedVideoAd.show() to display them.

Reference

Methods

load

Loads a rewarded video ad.

Reference

  1. () => Promise<any>

API Support

API WeChat Mini-Program H5 React Native
RewardedVideoAd.load ✔️

show

Displays rewarded video ads. These ads are pushed from the bottom of the screen.

Reference

  1. () => Promise<any>

API Support

API WeChat Mini-Program H5 React Native
RewardedVideoAd.show ✔️

destroy

Destory rewarded video ads.

Reference

  1. () => void

API Support

API WeChat Mini-Program H5 React Native
RewardedVideoAd.destroy ✔️

offClose

Un-listens on the event of tapping the Close Ad button.

Reference

  1. (callback: OffCloseCallback) => void
Property Type
callback OffCloseCallback

API Support

API WeChat Mini-Program H5 React Native
RewardedVideoAd.offClose ✔️

offError

Un-listens on the rewarded video error event.

Reference

  1. (callback: OffErrorCallback) => void
Property Type
callback OffErrorCallback

API Support

API WeChat Mini-Program H5 React Native
RewardedVideoAd.offError ✔️

offLoad

Un-listens on the rewarded video ad loading event.

Reference

  1. (callback: OffLoadCallback) => void
Property Type
callback OffLoadCallback

API Support

API WeChat Mini-Program H5 React Native
RewardedVideoAd.offLoad ✔️

onClose

Listens on the event of tapping the Close Ad button.

Reference

  1. (callback: OnCloseCallback) => void
Property Type
callback OnCloseCallback

API Support

API WeChat Mini-Program H5 React Native
RewardedVideoAd.onClose ✔️

onError

Listens on the rewarded video error event.

Reference

  1. (callback: OnErrorCallback) => void
Property Type
callback OnErrorCallback

API Support

API WeChat Mini-Program H5 React Native
RewardedVideoAd.onError ✔️

onLoad

Listens on the rewarded video ad loading event.

Reference

  1. (callback: OnLoadCallback) => void
Property Type
callback OnLoadCallback

API Support

API WeChat Mini-Program H5 React Native
RewardedVideoAd.onLoad ✔️

Parameters

OnErrorCallbackResult

Property Type Description
errCode 1000 | 1001 | 1002 | 1003 | 1004 | 1005 | 1006 | 1007 | 1008 Error code
Reference
errMsg string Error message

OnCloseCallbackResult

Property Type Description
isEnded boolean Indicates whether the video is closed when the user watches it to the end

OffCloseCallback

The callback function for the event of tapping the Close Ad button.

  1. (res: CallbackResult) => void
Property Type
res CallbackResult

OffErrorCallback

The callback function for the rewarded video ad error event.

  1. (res: CallbackResult) => void
Property Type
res CallbackResult

OffLoadCallback

The callback function for the rewarded video ad loading event.

  1. (res: CallbackResult) => void
Property Type
res CallbackResult

OnCloseCallback

The callback function for the event of tapping the Close Ad button.

  1. (result: OnCloseCallbackResult) => void
Property Type
result OnCloseCallbackResult

OnErrorCallback

The callback function for the rewarded video ad error event.

  1. (result: OnErrorCallbackResult) => void
Property Type
result OnErrorCallbackResult

OnLoadCallback

The callback function for the rewarded video ad loading event.

  1. (res: CallbackResult) => void
Property Type
res CallbackResult

API Support

API WeChat Mini-Program H5 React Native
RewardedVideoAd.load ✔️
RewardedVideoAd.show ✔️
RewardedVideoAd.destroy ✔️
RewardedVideoAd.offClose ✔️
RewardedVideoAd.offError ✔️
RewardedVideoAd.offLoad ✔️
RewardedVideoAd.onClose ✔️
RewardedVideoAd.onError ✔️
RewardedVideoAd.onLoad ✔️