Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(web): hide download while video is still processing

Richie McIlroy39da314cd356
diff --git a/apps/web/app/s/[videoId]/page.tsx b/apps/web/app/s/[videoId]/page.tsx
index 8eafd3ee9..83ada4319 100644
--- a/apps/web/app/s/[videoId]/page.tsx
+++ b/apps/web/app/s/[videoId]/page.tsx
@@ -844,14 +844,18 @@ async function AuthorizedContent({
video.orgSettings?.defaultPlaybackSpeed,
);
- const canDownloadVideo = userId
- ? await canUserDownloadVideo({
- userId,
- ownerId: video.owner.id,
- videoId,
- orgId: video.orgId,
- })
- : false;
+ const isVideoDownloadReady =
+ !hasActiveUpload && video.source?.type !== "desktopSegments";
+
+ const canDownloadVideo =
+ userId && isVideoDownloadReady
+ ? await canUserDownloadVideo({
+ userId,
+ ownerId: video.owner.id,
+ videoId,
+ orgId: video.orgId,
+ })
+ : false;
let videoHasEdits = false;
if (canDownloadVideo) {