RewardedVideoAd.show
收藏我的收藏
基础库 1.3.0 开始支持本方法,这是一个同步方法。
广告创建后默认是隐藏的,可以通过该方法显示广告。 该方法返回一个 Promise 对象。当广告组件正常获取素材时,该 Promise 对象会是一个 resolved Promise。当广告组件发生错误时,会是一个 rejected Promise,参数与 error 事件监听器获得的参数相同。
前提条件 | 无 |
业务背景 | 无 |
使用限制 | 无 |
注意事项 | 无 |
相关教程 | 无 |
语法
RewardedVideoAd.show()
参数说明
无
返回值
类型 | 说明 | 最低支持版本 |
---|---|---|
Promise | 一个 Promise 对象 | 1.3.0 |
错误码
errNo | errMsg | 说明 | 最低支持版本 |
---|---|---|---|
1003 | incentive card show now | 1.3.0 | |
1003 | Video Ad show now | 小游戏框架内部错误,有需要请创建工单咨询 | 1.3.0 |
1003 | current activity is null, can not create game banner | 1.3.0 | |
1003 | Please apply for an adUnitId | 1.3.0 | |
1003 | can not create game banner | 小游戏框架内部错误,有需要请创建工单咨询 | 1.3.0 |
1006 | The scene does not support advertising | 1.3.0 | |
1001 | The adUnitId is empty | 1.3.0 | |
1008 | The adUnitId is closed | 1.3.0 | |
1007 | The adUnitId is prohibit | 1.3.0 | |
21000 | The adUnitId is invalid | 1.3.0 | |
20000 | internal error | 小游戏框架内部错误,有需要请创建工单咨询 | 1.3.0 |
21000 | ad not found | 重复 | 1.3.0 |
10301 | feature is not supported in app | 1.3.0 | |
1003 | The video advertisement for current adUnitId doesn't exist | 1.3.0 | |
21000 | unitid is illegal | 1.3.0 | |
21000 | unitid is illegal | 1.3.0 | |
21000 | unitid is illegal | 1.3.0 | |
21000 | unitid is illegal | 小游戏框架内部错误,有需要请创建工单咨询 | 1.3.0 |
21000 | unitid is illegal | 1.3.0 | |
1003 | The adUnitId is empty | 1.3.0 | |
1003 | The adUnitId is invalid | 1.3.0 | |
1003 | unknown ad type | 1.3.0 | |
1002 | The adUnitId is invalid | 小游戏框架内部错误,有需要请创建工单咨询 | 1.3.0 |
1003 | There is an Video playing now | 1.3.0 | |
1003 | show fail | 小游戏框架内部错误,有需要请创建工单咨询 | 1.3.0 |
1001 | operate type is invalid | 小游戏框架内部错误,有需要请创建工单咨询 | 1.3.0 |
21000 | The video advertisement for current adUnitId hasn't completed loading. | 小游戏框架内部错误,有需要请创建工单咨询 | 1.3.0 |
21000 | The video advertisement for current adUnitId hasn't completed loading. | 小游戏框架内部错误,有需要请创建工单咨询 | 1.3.0 |
21000 | The video advertisement for current adUnitId hasn't completed loading. | 1.3.0 | |
21000 | The video advertisement for current adUnitId hasn't completed loading. | 小游戏框架内部错误,有需要请创建工单咨询 | 1.3.0 |
20000 | banner ad destroyed, adUnitId: ${this.#adUnitId} | 1.3.0 |
代码示例
const videoAd = tt.createRewardedVideoAd(); videoAd.show().then(() => { console.log("视频广告展示"); });