Merge branch '20251014-fix-video-path' into dev

This commit is contained in:
moux1024 2025-10-14 18:43:22 +08:00
commit ae630e9757

View File

@ -80,12 +80,13 @@ export function createScreenAdapter(): void {
export const downloadVideo = async (url: string) => {
try {
const response = await fetch(decodeURIComponent(url));
const modifyUrl = decodeURIComponent(url);
const response = await fetch(modifyUrl);
const blob = await response.blob();
const blobUrl = window.URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = blobUrl;
a.download = url.split('/').pop() || 'video.mp4';
a.download = modifyUrl.split('/').pop() || 'video.mp4';
document.body.appendChild(a);
a.click();
document.body.removeChild(a);