Skip to main content
Version: Next

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

() => Promise<any>

API Support

APIWeChat Mini-ProgramH5React Native
RewardedVideoAd.load✔️

show

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

Reference

() => Promise<any>

API Support

APIWeChat Mini-ProgramH5React Native
RewardedVideoAd.show✔️

destroy

Destory rewarded video ads.

Reference

() => void

API Support

APIWeChat Mini-ProgramH5React Native
RewardedVideoAd.destroy✔️

offClose

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

Reference

(callback: OffCloseCallback) => void
PropertyType
callbackOffCloseCallback

API Support

APIWeChat Mini-ProgramH5React Native
RewardedVideoAd.offClose✔️

offError

Un-listens on the rewarded video error event.

Reference

(callback: OffErrorCallback) => void
PropertyType
callbackOffErrorCallback

API Support

APIWeChat Mini-ProgramH5React Native
RewardedVideoAd.offError✔️

offLoad

Un-listens on the rewarded video ad loading event.

Reference

(callback: OffLoadCallback) => void
PropertyType
callbackOffLoadCallback

API Support

APIWeChat Mini-ProgramH5React Native
RewardedVideoAd.offLoad✔️

onClose

Listens on the event of tapping the Close Ad button.

Reference

(callback: OnCloseCallback) => void
PropertyType
callbackOnCloseCallback

API Support

APIWeChat Mini-ProgramH5React Native
RewardedVideoAd.onClose✔️

onError

Listens on the rewarded video error event.

Reference

(callback: OnErrorCallback) => void
PropertyType
callbackOnErrorCallback

API Support

APIWeChat Mini-ProgramH5React Native
RewardedVideoAd.onError✔️

onLoad

Listens on the rewarded video ad loading event.

Reference

(callback: OnLoadCallback) => void
PropertyType
callbackOnLoadCallback

API Support

APIWeChat Mini-ProgramH5React Native
RewardedVideoAd.onLoad✔️

Parameters

OnErrorCallbackResult

PropertyTypeDescription
errCode1000 | 1001 | 1002 | 1003 | 1004 | 1005 | 1006 | 1007 | 1008Error code
Reference
errMsgstringError message

OnCloseCallbackResult

PropertyTypeDescription
isEndedbooleanIndicates 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
PropertyType
resCallbackResult

OffErrorCallback

The callback function for the rewarded video ad error event.

(res: CallbackResult) => void
PropertyType
resCallbackResult

OffLoadCallback

The callback function for the rewarded video ad loading event.

(res: CallbackResult) => void
PropertyType
resCallbackResult

OnCloseCallback

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

(result: OnCloseCallbackResult) => void
PropertyType
resultOnCloseCallbackResult

OnErrorCallback

The callback function for the rewarded video ad error event.

(result: OnErrorCallbackResult) => void
PropertyType
resultOnErrorCallbackResult

OnLoadCallback

The callback function for the rewarded video ad loading event.

(res: CallbackResult) => void
PropertyType
resCallbackResult

API Support

APIWeChat Mini-ProgramH5React Native
RewardedVideoAd.load✔️
RewardedVideoAd.show✔️
RewardedVideoAd.destroy✔️
RewardedVideoAd.offClose✔️
RewardedVideoAd.offError✔️
RewardedVideoAd.offLoad✔️
RewardedVideoAd.onClose✔️
RewardedVideoAd.onError✔️
RewardedVideoAd.onLoad✔️