[Video] Make compress/upload cancelable (#4996)
* add abort controller to video upload system * rm log * rm log 2
This commit is contained in:
parent
551c4a4f32
commit
ea5ab99399
10 changed files with 104 additions and 58 deletions
|
|
@ -10,8 +10,9 @@ export type CompressedVideo = {
|
|||
// doesn't actually compress, but throws if >100MB
|
||||
export async function compressVideo(
|
||||
file: string,
|
||||
_callbacks?: {
|
||||
onProgress: (progress: number) => void
|
||||
_opts?: {
|
||||
signal?: AbortSignal
|
||||
onProgress?: (progress: number) => void
|
||||
},
|
||||
): Promise<CompressedVideo> {
|
||||
const blob = await fetch(file).then(res => res.blob())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue