[Video] Make compress/upload cancelable (#4996)

* add abort controller to video upload system

* rm log

* rm log 2
This commit is contained in:
Samuel Newman 2024-08-29 17:00:12 +01:00 committed by GitHub
parent 551c4a4f32
commit ea5ab99399
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 104 additions and 58 deletions

View file

@ -1,5 +1,4 @@
import React, {
Suspense,
useCallback,
useEffect,
useImperativeHandle,
@ -700,15 +699,10 @@ export const ComposePost = observer(function ComposePost({
<VideoTranscodeProgress
asset={videoUploadState.asset}
progress={videoUploadState.progress}
clear={clearVideo}
/>
) : videoUploadState.video ? (
// remove suspense when we get rid of lazy
<Suspense fallback={null}>
<VideoPreview
video={videoUploadState.video}
clear={clearVideo}
/>
</Suspense>
<VideoPreview video={videoUploadState.video} clear={clearVideo} />
) : null}
</View>
</Animated.ScrollView>