分类
教程
文章
官方文档
入门教程
文章
VIP会员
DownloadTask.onProgressUpdate
赞
收藏
更多文章
目录
UserGameData
无标题文章
整体介绍
无标题文章
无标题文章
注册账号
创建小游戏
开发前准备
开发与调试
内容转发
审核流程
发布小程序
无标题文章
无标题文章
开发者自审标准
字节跳动广告展现规范
视频激励-录屏分享参考规范
图片资源使用注意事项
排行榜运营活动
纹理内存优化
搜索
A
A
默认
护眼
夜间
阅读(876)
赞
(
5
)
DownloadTask.onProgressUpdate
2020-02-14 22:10:56 更新
DownloadTask.onProgressUpdate(function callback)
监听下载进度变化事件
输入
callback function
监听事件的回调函数
输出
callback 回调函数接收的对象扩展属性:
属性
类型
说明
progress
number
下载进度百分比
totalBytesWritten
number
已经下载的数据长度,单位 Bytes
totalBytesExpectedToWrite
number
预期需要下载的数据总长度,单位 Bytes
←
DownloadTask.abort
tt.request
→