let dtask = plus.downloader.createDownload(ts.url, {
filename: ‘https://d.mhqiyi.com/ppvod/z6udBeXs’,
retry: 5,
retryInterval: 120,
timeout: 30
}, function(d, status) {
console.log(d)
}
dtask.addEventListener("statechanged", (d, status) => {
const maps = that.tsMap;
const url = d.url
const tSize = d.totalSize || 0
const dSize = d.downloadedSize || 0
console.log(d)
return
}, false);
状态变化 d.totalSize 永远是0