Announcement: Tencent Cloud Mini Program Platform Renamed to Tencent Cloud Super App as a Service on January 2, 2025
Console Updates
Android SDK Updates
iOS SDK Updates
Flutter SDK Updates
IDE Updates
Base Library Updates
let rewardedVideoAd = nullPage({onLoad() {if(wx.createRewardedVideoAd){rewardedVideoAd = wx.createRewardedVideoAd({ adUnitId: 'xxxx' })rewardedVideoAd.onLoad(() => {console.log('onLoad event emit')})rewardedVideoAd.onError((err) => {console.log('onError event emit', err)})rewardedVideoAd.onClose((res) => {console.log('onClose event emit', res)})}}})
RewardedVideoAd.show() to display it.rewardedVideoAd.onLoad(() => {console.log('Rewarded video ad loaded successfully')})rewardedVideoAd.show().then(() => console.log('Rewarded video ad displayed'))rewardedVideoAd.onError(err => { console.log(err)})
res.isEnded to determine if the video was watched to the end and then issue the reward to the user.rewardedVideoAd.onClose(res => {// The user tapped the close button.if (res && res.isEnded) {// Normal playback ended, reward can be issued} else {// Playback was interrupted, no reward issued}})
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback