Skip to content

Commit ecd38b3

Browse files
save file
1 parent e6ca62b commit ecd38b3

File tree

1 file changed

+4
-3
lines changed
  • blog/25-07-31/fetch-download-stream/ex

1 file changed

+4
-3
lines changed

blog/25-07-31/fetch-download-stream/ex/ex.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767

6868

6969
var url = 'https://raw.githubusercontent.com/javascript-2020/external/main/ffmpeg/ffmpeg-wasm/ffmpeg-wasm.zip'
70-
// var url = 'https://bgrins.github.io/videoconverter.js/build/ffmpeg-all-codecs.js';
70+
var url = 'https://bgrins.github.io/videoconverter.js/build/ffmpeg-all-codecs.js';
7171

7272
var i = url.lastIndexOf('/')+1
7373
var fn = url.slice(i);
@@ -136,12 +136,13 @@
136136
total += value.length;
137137
chunks.push(value);
138138

139+
var args = ['chunk',datatype(value),value.byteLength];
139140
if(encoding){
140141
var w = (total/len*100).toFixed(1)+'%';
141142
$('#bar').style.width = w;
142-
console.log('chunk',datatype(value),value.byteLength,total,w);
143+
args.push(total,w);
143144
}
144-
145+
console.log.apply(console,args);
145146
}//while
146147

147148
var total = chunks.reduce((acc,chunk)=>acc+chunk.length,0);

0 commit comments

Comments
 (0)