function download(url) {
var timestamp = new Date().getTime();
let filename = timestamp + ".mp4"
fetch(url)
.then(response => response.blob())
.then(blob => {
const blobUrl = window.URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = blobUrl;
a.download = filename;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
window.URL.revokeObjectURL(blobUrl);
})
.catch(error => console.error('下载失败:', error));
}