forked from 77media/video-flow
Merge branch '20251014-fix-video-path' into dev
This commit is contained in:
commit
ae630e9757
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user