const url = window.URL.createObjectURL(new Blob([response])); const link = document.createElement('a'); link.href = url; link.setAttribute('download', 'video.mp4'); document.body.appendChild(link); link.click();