字节小程序文档
小程序
小程序
小游戏
介绍
开发
设计
数据
运营
第三方平台
社区
Codelabs
开发
指南
起步
小程序简介
快速开始
小程序代码构成
小程序安全开发
小程序安全开发指南
目录结构
小程序配置
全局配置
页面配置
小程序框架
逻辑层
注册小程序
注册页面
页面生命周期
页面路由
模块化
API
视图层
TTML
TTSS
事件系统
数据绑定
基础组件
获取页面节点信息
响应显示区域变化
小程序运行时
JavaScript支持情况
运行环境
运行机制
自定义组件
介绍
组件模板和样式
Component 构造器
组件生命周期
ref 获取组件实例
组件间通信与事件
组件行为 behaviors
自定义组件扩展 definitionFilter
数据监听器 observers
占位组件
provide-inject 跨层通信
基础能力
网络
画布
框架
基础说明
目录结构
全局配置
npm 功能
逻辑层
启动程序
启动页面
页面路由
文件作用域
API
视图层
TTML
TTML-数据绑定
TTML-列表渲染
TTML-条件渲染
TTML-模板
TTML-事件
TTML-引用
TTSS
组件
自定义组件
Component
Behaviors
场景值
分包加载
简介
普通分包
独立分包
分包预下载
流加载
流加载是什么
流加载和分包加载的区别
小程序运行时
JavaScript 支持情况
小程序运行机制
SJS语法参考
SJS介绍
模块
变量
注释
运算符
语句
数据类型
基础类库
组件
介绍
基础组件
基础内容
text 文本
rich-text 富文本
progress 进度条
icon 图标
视图容器
view 视图容器
scroll-view 可滚动视图区域
swiper 滑块视图容器
swiper-item
movable-area 可移动视图区域
movable-view 可移动视图容器
表单
button 按钮
checkbox 多选选择器
checkbox-group 多项选择器
form 表单
input 输入框
label 表单组件标签
picker 底部弹起的滚动选择器
picker-view 嵌入页面的滚动选择器
picker-view-column 嵌入页面的滚动选择器子项
radio 单选项目
radio-group 单向选择器
slider 滑动选择器
switch 开关选择器
textarea 多行文本输入框
导航
navigator 页面链接
媒体组件
image 图片
video 视频
live-player
camera 相机
画布
canvas 画布
地图
map 地图
开放能力
web-view 网页容器
ad 广告
open-data 开放数据
aweme-data 用户头像昵称组件
获取手机号
消息推送客服
原生组件
API
基础
tt.canIUse
tt.base64ToArrayBuffer
tt.arrayBufferToBase64
生命周期
tt.getEnterOptionsSync
tt.getLaunchOptionsSync
tt.exitMiniProgram
tt.canIPutStuffOverComponent
更新
tt.getUpdateManager
UpdateManager
定时器
setTimeout
clearTimeout
setInterval
clearInterval
应用级事件
tt.onAppShow
tt.offAppShow
tt.onAppHide
tt.offAppHide
tt.offUnhandledRejection
tt.onError
tt.offError
tt.onUnhandledRejection
环境变量
tt.env
网络
小程序 Cookie 机制
HTTP
RequestTask
tt.downloadFile
tt.request
UploadTask
DownloadTask
tt.uploadFile
WebSocket
tt.connectSocket
SocketTask
媒体
图片
tt.chooseImage
tt.saveImageToPhotosAlbum
tt.previewImage
tt.getImageInfo
tt.compressImage
录音
RecorderManager
tt.getRecorderManager
音频
tt.getBackgroundAudioManager
BackgroundAudioManager
tt.createInnerAudioContext
InnerAudioContext
视频
tt.chooseVideo
tt.saveVideoToPhotosAlbum
tt.preloadVideo
PreloadVideoTask
tt.chooseMedia
tt.createVideoContext
VideoContext
LivePlayerContext
tt.createLivePlayerContext
相机
tt.createCameraContext
CameraContext
CameraFrameListener
特效相机
tt.createEffectCameraStream
EffectCameraStream
EffectCameraVideo
地图
tt.createMapContext
MapContext
MapContext
MapContext.getCenterLocation
MapContext.getRegion
MapContext.getScale
MapContext.moveToLocation
MapContext.getRotate
MapContext.includePoints
MapContext.getSkew
MapContext.translateMarker
MapContext.moveAlong
MapContext.mapToScreen
MapContext.screenToMap
MapContext.setLocMarkerIcon
MapContext.openMapApp
MapContext.addGroundOverlay
MapContext.setCenterOffset
MapContext.updateGroundOverlay
MapContext.removeGroundOverlay
文件
tt.saveFile
tt.getFileInfo
tt.getSavedFileList
tt.openDocument
tt.removeSavedFile
tt.getFileSystemManager
FileSystemManager
FileSystemManager
FileSystemManager.access
FileSystemManager.accessSync
FileSystemManager.appendFile
FileSystemManager.copyFile
FileSystemManager.copyFileSync
FileSystemManager.appendFileSync
FileSystemManager.getFileInfo
FileSystemManager.getSavedFileList
FileSystemManager.mkdir
FileSystemManager.mkdirSync
FileSystemManager.readFile
FileSystemManager.readFileSync
FileSystemManager.readdir
FileSystemManager.readdirSync
FileSystemManager.removeSavedFile
FileSystemManager.rename
FileSystemManager.renameSync
FileSystemManager.rmdir
FileSystemManager.rmdirSync
FileSystemManager.saveFile
FileSystemManager.saveFileSync
FileSystemManager.stat
FileSystemManager.statSync
FileSystemManager.unlink
FileSystemManager.unlinkSync
FileSystemManager.unzip
FileSystemManager.writeFile
FileSystemManager.writeFileSync
FileSystemManager.truncateSync
FileSystemManager.truncate
Stat
Stat
Stats.isDirectory
Stats.isFile
开放接口
环境信息
tt.getEnvInfoSync
登录
tt.login
tt.checkSession
用户信息
tt.getUserInfo
tt.getUserProfile
敏感数据处理
广告
激励视频广告
插屏广告
支付
tt.pay
小程序跳转
tt.navigateToMiniProgram
tt.navigateBackMiniProgram
收货地址
tt.chooseAddress
设置
tt.getSetting
tt.openSetting
AuthSetting
授权
tt.authorize
tt.showDouyinOpenAuth
数据分析
tt.reportAnalytics
抖音视频能力
发布抖音视频
评价能力
tt.canRateAwemeOrders
tt.rateAwemeOrder
引导关注
tt.followOfficialAccount
tt.checkFollowState
tt.openAwemeUserProfile
tt.followAwemeUser
tt.checkFollowAwemeState
订阅消息
tt.requestSubscribeMessage
性能
tt.performance
数据缓存
tt.getStorage
tt.getStorageSync
tt.setStorage
tt.setStorageSync
tt.removeStorage
tt.removeStorageSync
tt.clearStorage
tt.clearStorageSync
tt.getStorageInfo
tt.getStorageInfoSync
地理位置
tt.getLocation
tt.chooseLocation
tt.openLocation
tt.startLocationUpdate
tt.stopLocationUpdate
tt.onLocationChange
tt.offLocationChange
tt.onLocationChangeError
tt.offLocationChangeError
设备
网络状态
tt.getNetworkType
tt.onNetworkStatusChange
tt.getWifiList
tt.onGetWifiList
tt.offGetWifiList
系统信息
tt.getSystemInfo
tt.getSystemInfoSync
Wi-Fi
tt.getConnectedWifi
加速度计
tt.startAccelerometer
tt.stopAccelerometer
tt.onAccelerometerChange
罗盘
tt.startCompass
tt.stopCompass
tt.onCompassChange
拨打电话
tt.makePhoneCall
扫码
tt.scanCode
剪贴板
tt.getClipboardData
tt.setClipboardData
屏幕
tt.setKeepScreenOn
tt.onUserCaptureScreen
tt.offUserCaptureScreen
tt.getScreenBrightness
tt.setScreenBrightness
tt.disableUserScreenRecord
tt.enableUserScreenRecord
tt.onUserScreenRecord
tt.offUserScreenRecord
振动
tt.vibrateShort
tt.vibrateLong
性能
tt.onMemoryWarning
画布
V1
tt.createCanvasContext
tt.canvasToTempFilePath
CanvasContext
CanvasGradient
CanvasColor
V2
tt.createOffscreenCanvas
RenderingContext
Image
Canvas
OffscreenCanvas
界面
交互反馈
tt.showToast
tt.hideToast
tt.showLoading
tt.hideLoading
tt.showModal
tt.showActionSheet
tt.showFavoriteGuide
tt.showInteractionBar
tt.enableAlertBeforeUnload
tt.hideInteractionBar
tt.disableAlertBeforeUnload
导航栏
tt.showNavigationBarLoading
tt.hideNavigationBarLoading
tt.hideHomeButton
tt.setNavigationBarTitle
tt.setNavigationBarColor
菜单
tt.getCustomButtonBoundingClientRect
tt.getMenuButtonBoundingClientRect
动画
tt.createAnimation
页面位置
tt.pageScrollTo
滑动返回
tt.setSwipeBackMode
下拉刷新
Page.onPullDownRefresh
tt.startPullDownRefresh
tt.stopPullDownRefresh
TabBar
tt.showTabBarRedDot
tt.showTabBar
tt.setTabBarStyle
tt.setTabBarItem
tt.setTabBarBadge
tt.removeTabBarBadge
tt.hideTabBarRedDot
tt.hideTabBar
AI/AR能力
AI/AR 能力简介
算法管理器方案
算法能力简介
tt.getAlgorithmManager
AlgorithmManager
AlgorithmResult
特效贴纸方案
贴纸方案简介
tt.createStickerManager
原生神经网络方案
原生神经网络方案简介
tt.createBytennEngineContext
BytennEngineContext
BytennEngine
导航
tt.navigateTo
tt.redirectTo
tt.switchTab
tt.navigateBack
tt.reLaunch
转发
转发
ShareOption
ShareParam
视频拍摄器
tt.showShareMenu
tt.hideShareMenu
tt.navigateToVideoView
第三方平台
tt.getExtConfig
tt.getExtConfigSync
TTML
tt.createSelectorQuery
SelectorQuery
SelectorQuery
SelectorQuery.in
SelectorQuery.select
SelectorQuery.selectAll
SelectorQuery.selectViewport
SelectorQuery.exec
tt.createIntersectionObserver
NodesRef
NodesRef
NodesRef.boundingClientRect
NodesRef.scrollOffset
NodesRef.fields
NodesRef.node
IntersectionObserver
IntersectionObserver
IntersectionObserver.relativeTo
IntersectionObserver.relativeToViewport
IntersectionObserver.observe
IntersectionObserver.disconnect
其它
标准对象输入
用户授权
本地数据缓存
参数调起使用场景描述
直播能力
tt.openWebcastRoom
LiveReportContext
LiveReportContext
LiveReportContext.orderConfirmPageShow
LiveReportContext.orderSubmit
LiveReportContext.productDetailsShow
LiveReportContext.productSelect
LiveReportContext.productShareClick
LiveReportContext.shelfShow
tt.createLiveReportContext
tt.getRoomInfo
tt.getLiveUserInfo
tt.getSelfCommentCountDuringPluginRunning
tt.isFollowingAnchor
直播间关注互动数据
tt.onReceiveAudiencesFollowAction
tt.subscribeAudiencesFollowAction
tt.unsubscribeAudiencesFollowAction
直播间评论互动数据
tt.subscribeSpecifiedContentComment
tt.subscribeSpecifiedUserComment
tt.unsubscribeAllSpecifiedContentComment
tt.unsubscribeAllSpecifiedUserComment
tt.onReceiveSpecifiedComment
服务端
服务端API介绍
接口调用凭证
getAccessToken
登录
code2Session
数据缓存
setUserStorage
removeUserStorage
二维码
createQRCode
内容安全
内容安全检测
图片检测V2
担保支付
支付产品介绍
接入准备
接入指南
API列表
进件
支付
退款
结算及分账
退分账
提现
获取对账单
接口获取页面链接
进件
提现
测试引导
其它
拍抖音黑白名单管理能力
用户登录态签名
抖音开放平台与小程序视频打通能力
小程序任务台任务上传
任务台任务更新
任务状态修改
查询小程序任务台任务 ID
课程库
【泛知识】课程库介绍
【泛知识】上传课程资源
【泛知识】查询课程资源上传状态
【泛知识】添加资质
【泛知识】修改资质
【泛知识】添加课程
【泛知识】查询资质
【泛知识】修改课程
【泛知识】修改课程状态
【泛知识】查询课程
课程库回调信息同步接口
【泛知识】课程库 FAQ
订阅消息
发送订阅消息
开发者工具
概览
界面
启动页
菜单栏
工具栏
模拟器
编辑器
调试器
设置
外观设置
代理设置
代码编辑
文件
Git 状态展示
小程序调试
自定义编译条件
IDE 调试
真机调试
直播场景调试
开发辅助
小程序一键搬家工具
小程序 VSCode 插件
IDE 代码片段
IDE API Mock 功能
小程序线上调试彩蛋页
小程序研发工具箱
担保支付签名校验工具
性能 Trace 工具
体验评分
下载
开发者工具正式版下载
开发者工具开发版下载
常见问题
基础库
更新日志
版本分布及各 APP 对应关系
兼容性说明
性能优化
小程序性能优化概述
小程序性能优化的意义
小程序的性能指标
小程序性能优化的原理和手段
小程序的运行流程
小程序的启动性能优化
小程序的运行时性能优化
优化手段
数据预取
TTWebAssembly
小程序框架骨架屏
性能数据分析
性能分析工具
客户端性能分析工具
性能 Trace 工具
体验评分
体验评分简介
评分方法
评分规则
功能接入指南
广告组件接入指南
广告组件说明
流量主开通流程
流量主广告规范及约束协议
小程序流量主行为规范及违规处罚规则
小程序广告收入结算
小程序广告结算指南
电子合同签署与广告结算 FAQ
小程序结算账户信息修改功能-修改开户行、银行账号、开户支行名称等
小程序结算单税率修改
CA 签章使用指引
分享能力接入指南
客服消息能力
客服消息能力介绍
小程序官方客服
消息推送客服
引导关注头条号
获取用户手机号权限申请
获取小程序页面结构自定义能力规范
高精度定位运营规范
获取挂载小程序的视频
订阅消息能力
引导关注抖音号
抖音开放能力介绍
搜索自然结果小程序接入申请
扫普通链接二维码打开小程序
抖音开放平台升级(迁移)指引
自2022年9月6日起,本文档站不再更新内容,相关文档已迁移至全新“抖音开放平台”
前往
PreloadVideoTask
通过
tt.preloadVideo
获取的实例,通过它能够中断视频预加载任务。
属性
无
方法
方法名
说明
最低支持版本
abort
中断视频预加载任务
2.8.0
点击纠错
该文档是否对你的开发有所帮助?
有帮助
没帮助
该文档是否对你的开发有所帮助?
有帮助
没帮助
PreloadVideoTask
属性
方法