diff --git a/app/src/render.ts b/app/src/render.ts index d4d894d..1c3ec2a 100644 --- a/app/src/render.ts +++ b/app/src/render.ts @@ -80,14 +80,20 @@ class Render { if (asset.type === AssetType.video) { subpath = '/video/playback' - // Stream videos in 2.5 MB chunks rather than the entire file - const range = (req.range || '').replace(/bytes=/, '').split('-') - const start = parseInt(range[0], 10) || 0 - const end = parseInt(range[1], 10) || start + 2499999 - fetchHeaders.range = `bytes=${start}-${end}` - headerList.push('cache-control', 'content-range') res.setHeader('accept-ranges', 'bytes') - res.status(206) // Partial Content + // Only chunk when the client sent a Range header. A browser