diff --git a/app/package.json b/app/package.json index 5b7132b..501c4b1 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "immich-public-proxy", - "version": "1.5.1", + "version": "1.5.2", "scripts": { "dev": "ts-node src/index.ts", "build": "npx tsc", diff --git a/app/src/render.ts b/app/src/render.ts index 98691eb..677fdea 100644 --- a/app/src/render.ts +++ b/app/src/render.ts @@ -39,7 +39,8 @@ class Render { if (asset.type === AssetType.video) { const range = (req.range || '').replace(/bytes=/, '').split('-') const start = parseInt(range[0], 10) || 0 - headers.range = `bytes=${start}-${start + 2499999}` + const end = parseInt(range[1], 10) || start + 2499999 + headers.range = `bytes=${start}-${end}` headerList.push('cache-control', 'content-range') res.setHeader('accept-ranges', 'bytes') res.status(206) // Partial Content @@ -98,8 +99,8 @@ class Render { } ], attributes: { - preload: false, - controls: true + playsinline: 'playsinline', + controls: 'controls' } }) }