抖音开放平台Logo
开发者文档
控制台

RewardedVideoAd.show
收藏
我的收藏

基础库 1.3.0 开始支持本方法,这是一个同步方法。

广告创建后默认是隐藏的,可以通过该方法显示广告。 该方法返回一个 Promise 对象。当广告组件正常获取素材时,该 Promise 对象会是一个 resolved Promise。当广告组件发生错误时,会是一个 rejected Promise,参数与 error 事件监听器获得的参数相同。

前提条件
业务背景
使用限制
注意事项
相关教程

语法

RewardedVideoAd.show()

参数说明

返回值

类型说明最低支持版本
Promise

一个 Promise 对象

1.3.0

错误码

errorCodeerrMsgerrorType说明最低支持版本
114507incentive card show nowD
1.3.0
114508Video Ad show nowF
小游戏框架内部错误,有需要请创建工单咨询
1.3.0
114501current activity is null, can not create game bannerD
1.3.0
114503Please apply for an adUnitIdD
1.3.0
114502can not create game bannerF
小游戏框架内部错误,有需要请创建工单咨询
1.3.0
999987The scene does not support advertisingD
1.3.0
999999The adUnitId is emptyD
1.3.0
114504The adUnitId is closedD
1.3.0
114505The adUnitId is prohibitD
1.3.0
114506The adUnitId is invalidD
1.3.0
999993internal errorF
小游戏框架内部错误,有需要请创建工单咨询
1.3.0
114509ad not foundD
重复
1.3.0
999987feature is not supported in appD
1.3.0
114509The video advertisement for current adUnitId doesn't existD
1.3.0
999999unitid is illegalD
1.3.0
114503unitid is illegalD
1.3.0
114507unitid is illegalD
1.3.0
999991unitid is illegalF
小游戏框架内部错误,有需要请创建工单咨询
1.3.0
114504unitid is illegalD
1.3.0
999999The adUnitId is emptyD
1.3.0
114503The adUnitId is invalidD
1.3.0
114507unknown ad typeD
1.3.0
999993The adUnitId is invalidF
小游戏框架内部错误,有需要请创建工单咨询
1.3.0
114519There is an Video playing nowU
1.3.0
999991show failF
小游戏框架内部错误,有需要请创建工单咨询
1.3.0
999993operate type is invalidF
小游戏框架内部错误,有需要请创建工单咨询
1.3.0
114510The video advertisement for current adUnitId hasn't completed loading.F
小游戏框架内部错误,有需要请创建工单咨询
1.3.0
114511The video advertisement for current adUnitId hasn't completed loading.F
小游戏框架内部错误,有需要请创建工单咨询
1.3.0
114512The video advertisement for current adUnitId hasn't completed loading.D
1.3.0
999993The video advertisement for current adUnitId hasn't completed loading.F
小游戏框架内部错误,有需要请创建工单咨询
1.3.0
114513banner ad destroyed, adUnitId: ${this.#adUnitId}D
1.3.0

代码示例

const videoAd = tt.createRewardedVideoAd(); videoAd.show().then(() => { console.log("视频广告展示"); });