Commit 906523e8 authored by liujiaxin's avatar liujiaxin

feat: 增加下载时长

parent 88fd58dc
......@@ -947,12 +947,12 @@ export class PlayComponent implements OnInit, OnDestroy {
uploadTestAudio(text, url, key) {
console.log(' in uploadTestAudio 111');
const dts = new Date().getTime();
this.url2Blob(url).then((buffer: ArrayBuffer) => {
console.log('res: ', buffer);
const startTime = new Date().getTime();
this.infoLabel.text = '音频大小' + this.formatBytes(buffer.byteLength) + '.';
this.infoLabel.text = '音频大小' + this.formatBytes(buffer.byteLength) + '.下载时长:' + (dts - startTime) + 's.';
const blob = new Blob([buffer], {type: 'audio/mpeg'});
// const blob = res //new Blob([u8arr], {type: mime});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment