Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
fix(workflow): auto-complete segment manifest before mux
Richie McIlroy4391e4185bf9
diff --git a/apps/web/workflows/finalize-desktop-recording.ts b/apps/web/workflows/finalize-desktop-recording.tsindex 3c1dd982b..759b94dc3 100644--- a/apps/web/workflows/finalize-desktop-recording.ts+++ b/apps/web/workflows/finalize-desktop-recording.ts@@ -292,18 +292,28 @@ async function buildDesktopSegmentsMuxBody(throw new Error("Invalid segment manifest JSON");}- const manifest = await Schema.decodeUnknown(Video.SegmentManifest)(parsed)+ let manifest = await Schema.decodeUnknown(Video.SegmentManifest)(parsed).pipe(Effect.mapError(() => new Error("Invalid segment manifest format"))).pipe(runPromise);- if (!manifest.is_complete) {- throw new Error("Segment manifest is not marked as complete");- }-if (!manifest.video_init_uploaded || manifest.video_segments.length === 0) {throw new Error("No video segments found in manifest");}+ if (!manifest.is_complete) {+ manifest = {+ ...manifest,+ is_complete: true,+ };+ const body = JSON.stringify(manifest, null, 2);+ await bucket+ .putObject(segSource.getManifestKey(), body, {+ contentType: "application/json",+ contentLength: Buffer.byteLength(body),+ })+ .pipe(runPromise);+ }+const videoInitUrl = await bucket.getSignedObjectUrl(segSource.getVideoInitKey(), {expiresIn: MEDIA_SERVER_PRESIGNED_GET_EXPIRES_SECONDS,