diff options
| author | metamuffin <metamuffin@disroot.org> | 2023-09-08 16:39:47 +0200 | 
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2023-09-08 16:39:47 +0200 | 
| commit | 2130fa3c1d705ce76d88cb49ee6baa4028267577 (patch) | |
| tree | 509686fa52f803977e44d094ad1c650290c3a7ca /client-web | |
| parent | 60c2247b4bd0086099b872233390e99b23ddd81c (diff) | |
| download | keks-meet-2130fa3c1d705ce76d88cb49ee6baa4028267577.tar keks-meet-2130fa3c1d705ce76d88cb49ee6baa4028267577.tar.bz2 keks-meet-2130fa3c1d705ce76d88cb49ee6baa4028267577.tar.zst | |
fix fallbackdownloadstream type
Diffstat (limited to 'client-web')
| -rw-r--r-- | client-web/source/download_stream.ts | 16 | 
1 files changed, 6 insertions, 10 deletions
| diff --git a/client-web/source/download_stream.ts b/client-web/source/download_stream.ts index d2cf1c5..6ea7f70 100644 --- a/client-web/source/download_stream.ts +++ b/client-web/source/download_stream.ts @@ -19,16 +19,12 @@ function FallbackStreamDownload(size: number, filename?: string, progress?: (pos              a.click()          },          abort() { buffer = new Uint8Array(); /* have fun gc */ }, -        write(chunk: Blob) { -            const reader = new FileReader(); -            reader.onload = function (event) { -                const arr = new Uint8Array(event.target!.result as ArrayBuffer); -                for (let i = 0; i < arr.length; i++, position++) { -                    buffer[position] = arr[i] -                } -                if (progress) progress(position) -            }; -            reader.readAsArrayBuffer(chunk); +        write(chunk: ArrayBuffer) { +            const arr = new Uint8Array(chunk as ArrayBuffer); +            for (let i = 0; i < arr.length; i++, position++) { +                buffer[position] = arr[i] +            } +            if (progress) progress(position)          }      }  } | 
