Bun.mp4 Online

// Proposal for new feature Bun.serve({ async fetch(req) { const file = Bun.file("./bun.mp4"); // Optimized built-in method return new Response(await Bun.serveVideo(file, req)); }, }); Use code with caution. Copied to clipboard

Description * What version of Bun is running? 1.1.21+70ca2b76c. * What platform is your computer? Microsoft Windows NT 10.0.22631. bun.mp4

Do you need to support (transcoding) or just streaming ? I can refine this feature proposal further. // Proposal for new feature Bun

Bun does not support streaming videos with range requests #10440 * What platform is your computer

Leveraging Bun.file (which provides lazy loading of files) to stream directly without loading the whole video into memory. 2. Example Usage: javascript

Based on the search results, "bun.mp4" appears in issues related to Bun's handling of video streaming (specifically Range requests causing infinite loading) and memory leaks during fetch calls.

Fixes the reported memory leaks when fetching media.