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
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
API Support API WeChat Mini-Program H5 React Native RewardedVideoAd.show ✔️
destroy Destory rewarded video ads.
Reference
API Support API WeChat Mini-Program H5 React Native RewardedVideoAd.destroy ✔️
offClose Un-listens on the event of tapping the Close Ad
button.
Reference
( callback : OffCloseCallback ) => void
Copy 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
( callback : OffErrorCallback ) => void
Copy 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
( callback : OffLoadCallback ) => void
Copy 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
( callback : OnCloseCallback ) => void
Copy Property Type callback OnCloseCallback
API Support API WeChat Mini-Program H5 React Native RewardedVideoAd.onClose ✔️
onError Listens on the rewarded video error event.
Reference
( callback : OnErrorCallback ) => void
Copy 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
( callback : OnLoadCallback ) => void
Copy 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 codeReference 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.
( res : CallbackResult ) => void
Copy Property Type res CallbackResult
OffErrorCallback The callback function for the rewarded video ad error event.
( res : CallbackResult ) => void
Copy Property Type res CallbackResult
OffLoadCallback The callback function for the rewarded video ad loading event.
( res : CallbackResult ) => void
Copy Property Type res CallbackResult
OnCloseCallback The callback function for the event of tapping the Close Ad
button.
( result : OnCloseCallbackResult ) => void
Copy Property Type result OnCloseCallbackResult
OnErrorCallback The callback function for the rewarded video ad error event.
( result : OnErrorCallbackResult ) => void
Copy Property Type result OnErrorCallbackResult
OnLoadCallback The callback function for the rewarded video ad loading event.
( res : CallbackResult ) => void
Copy 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 ✔️