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

InterstitialAd.load
收藏
我的收藏

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

加载插屏广告。

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

语法

InterstitialAd.load()

参数说明

返回值

类型说明最低支持版本
Promise
Promise 对象
1.71.0

错误码

errNoerrMsg说明最低支持版本
2005There is no ad object to reload!
1.71.0
1003Needn't load again!
1.71.0
1003current activity is null, can not create game banner
1.71.0
1003Please apply for an adUnitId
1.71.0
1003can not create game banner
小游戏框架内部错误,有需要请创建工单咨询
1.71.0
1006The scene does not support advertising
1.71.0
1001The adUnitId is empty
1.71.0
1008The adUnitId is closed
1.71.0
1007The adUnitId is prohibit
1.71.0
1002The adUnitId is invalid
1.71.0
20000internal error
小游戏框架内部错误,有需要请创建工单咨询
1.71.0
21000host app not supported
1.71.0
21000ad not found
小游戏框架内部错误,有需要请创建工单咨询
1.71.0
21000unitid is illegal
1.71.0
21000unitid is illegal
1.71.0
21000unitid is illegal
1.71.0
21000unitid is illegal
1.71.0
21000unitid is illegal
1.71.0
21000unitid is illegal
小游戏框架内部错误,有需要请创建工单咨询
1.71.0
10301feature is not supported in app
1.71.0
1003host app not supported
1.71.0
1003The adUnitId is empty
1.71.0
1003The adUnitId is invalid
小游戏框架内部错误,有需要请创建工单咨询
1.71.0
1003unknown ad type
1.71.0
1002The adUnitId is invalid
小游戏框架内部错误,有需要请创建工单咨询
1.71.0
1003ad not found
小游戏框架内部错误,有需要请创建工单咨询
1.71.0
2006InterstitialAd has been destroyed
1.71.0

代码示例

const interstitialAd = tt.createInterstitialAd({ adUnitId: "YOUR_AD_UNITID", }); interstitialAd.load().then(() => { interstitialAd.show(); });