MCPcopy
hub / github.com/CapSoftware/Cap / start

Function start

apps/web/app/api/tools/loom-download/route.ts:133–146  ·  view source on GitHub ↗
(controller)

Source from the content-addressed store, hash-verified

131 const mp4Body = mp4Response.body;
132 const mp4Stream = new ReadableStream<Uint8Array>({
133 async start(controller) {
134 try {
135 const reader = mp4Body.getReader();
136 let done = false;
137 while (!done) {
138 const chunk = await reader.read();
139 done = chunk.done;
140 if (chunk.value) controller.enqueue(chunk.value);
141 }
142 controller.close();
143 } catch {
144 controller.close();
145 }
146 },
147 });
148
149 return new NextResponse(mp4Stream, {

Callers 9

importLoomVideoForOwnerFunction · 0.90
saveVideoEditsFunction · 0.90
restoreVideoToOriginalFunction · 0.90
retryVideoProcessingFunction · 0.90
adminReprocessVideoFunction · 0.90
transcribeVideoFunction · 0.90
startAiGenerationFunction · 0.90

Calls 2

readMethod · 0.80
enqueueMethod · 0.80

Tested by

no test coverage detected