add ability to download recordings
This commit is contained in:
parent
b6e91d7348
commit
b2270dc6c4
1 changed files with 14 additions and 0 deletions
|
|
@ -21,6 +21,20 @@ export default function VideoMoreMenu({ video }: Props) {
|
|||
{
|
||||
name: "Download",
|
||||
icon: <DownloadIcon />,
|
||||
props: {
|
||||
onClick: () => {
|
||||
void fetch(video.video_url).then((response) => {
|
||||
void response.blob().then((blob) => {
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
const a = document.createElement("a");
|
||||
a.href = url;
|
||||
a.download = video.title;
|
||||
a.click();
|
||||
});
|
||||
//window.location.href = response.url;
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Delete",
|
||||
|
|
|
|||
Loading…
Reference in a new issue