diff --git a/index/videos/template-video.html b/index/videos/template-video.html
index e06c8108..5b25188b 100644
--- a/index/videos/template-video.html
+++ b/index/videos/template-video.html
@@ -98,18 +98,12 @@
});
function downloadVideo() {
- fetch(videoUrl)
- .then(response => response.blob())
- .then(blob => {
- const link = document.createElement('a');
- link.href = URL.createObjectURL(blob);
- link.download = videoTitle + '.mp4'; // 设置下载文件名
+ var link = document.createElement('a');
+ link.href = videoUrl;
+ link.download = videoUrl.split('/').pop();
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
- URL.revokeObjectURL(link.href);
- })
- .catch(error => console.error('Error downloading the video:', error));
}