From b06bb65a0fadaa6085e3c1179a1c5035e41936a1 Mon Sep 17 00:00:00 2001 From: Vanilagy <1696106+Vanilagy@users.noreply.github.com> Date: Wed, 13 May 2026 15:59:53 +0200 Subject: [PATCH] Fix tab indentation --- packages/server/README.md | 56 +++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/packages/server/README.md b/packages/server/README.md index 4c1cf37..785c94f 100644 --- a/packages/server/README.md +++ b/packages/server/README.md @@ -53,38 +53,38 @@ registerMediabunnyServer(); const server = http.createServer(async (req, res) => { // Read the request body as a stream - const stream = Readable.toWeb(req) as ReadableStream; - const input = new Input({ - source: new ReadableStreamSource(stream), - formats: ALL_FORMATS, - }); + const stream = Readable.toWeb(req) as ReadableStream; + const input = new Input({ + source: new ReadableStreamSource(stream), + formats: ALL_FORMATS, + }); // Stream the output directly to the disk, could also stream to S3 etc. - const output = new Output({ - format: new Mp4OutputFormat(), - target: new FilePathTarget(`./converted-${crypto.randomUUID()}.mp4`), - }); + const output = new Output({ + format: new Mp4OutputFormat(), + target: new FilePathTarget(`./converted-${crypto.randomUUID()}.mp4`), + }); - try { - const conversion = await Conversion.init({ - input, - output, - video: async track => ({ - codec: 'avc', - height: Math.min(720, await track.getDisplayHeight()), - bitrate: QUALITY_MEDIUM, - }), - }); - await conversion.execute(); - - res.statusCode = 204; - res.end(); - } catch (error) { - res.statusCode = 500; - res.end(); + try { + const conversion = await Conversion.init({ + input, + output, + video: async track => ({ + codec: 'avc', + height: Math.min(720, await track.getDisplayHeight()), + bitrate: QUALITY_MEDIUM, + }), + }); + await conversion.execute(); + + res.statusCode = 204; + res.end(); + } catch (error) { + res.statusCode = 500; + res.end(); - console.error("Error processing media:", error); - } + console.error("Error processing media:", error); + } }); server.listen(3000);