Title: feature: add HTTP Range request support for video/audio seeking · Issue #68 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: feature: add HTTP Range request support for video/audio seeking · Issue #68 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: feature: add HTTP Range request support for video/audio seeking · Issue #68 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Summary JSS currently doesn't support HTTP Range requests, which means video/audio seeking (skipping forward/back) doesn't work. Current Behavior When a client requests a byte range (e.g., seeking in a video), JSS ignores the Range heade...
Open Graph Description: Summary JSS currently doesn't support HTTP Range requests, which means video/audio seeking (skipping forward/back) doesn't work. Current Behavior When a client requests a byte range (e.g., seeking ...
X Description: Summary JSS currently doesn't support HTTP Range requests, which means video/audio seeking (skipping forward/back) doesn't work. Current Behavior When a client requests a byte range (e.g., ...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/68
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feature: add HTTP Range request support for video/audio seeking","articleBody":"## Summary\n\nJSS currently doesn't support HTTP Range requests, which means video/audio seeking (skipping forward/back) doesn't work.\n\n## Current Behavior\n\nWhen a client requests a byte range (e.g., seeking in a video), JSS ignores the `Range` header and returns the full file with status 200.\n\n## Expected Behavior\n\nJSS should:\n1. Check for `Range` header in GET requests\n2. Parse byte range (e.g., `bytes=1000-2000` or `bytes=1000-`)\n3. Return partial content with status `206 Partial Content`\n4. Include proper headers:\n - `Content-Range: bytes start-end/total`\n - `Accept-Ranges: bytes`\n - `Content-Length: chunksize`\n\n## Use Cases\n\n- **Video seeking** - Skip to any point in a video without downloading the whole file\n- **Audio seeking** - Same for audio files\n- **Resumable downloads** - Resume interrupted large file downloads\n- **Efficient streaming** - Only transfer what's needed\n\n## Reference Implementation\n\nNSS has this in `lib/ldp.mjs:470-490` and `lib/handlers/get.mjs:54,124-128`:\n\n```javascript\n// Parse range header\nif (options.range) {\n const parts = options.range.replace(/bytes=/, '').split('-')\n const start = parseInt(parts[0], 10)\n const end = parts[1] ? parseInt(parts[1], 10) : total - 1\n const chunksize = (end - start) + 1\n contentRange = 'bytes ' + start + '-' + end + '/' + total\n \n // Create read stream with range\n stream = fs.createReadStream(path, { start, end })\n}\n\n// Set response headers\nif (contentRange) {\n res.status(206)\n res.set({\n 'Content-Range': contentRange,\n 'Accept-Ranges': 'bytes',\n 'Content-Length': chunksize\n })\n}\n```\n\n## Implementation Notes\n\nFor JSS with Fastify, the implementation would go in the GET handler:\n1. Check `request.headers.range`\n2. Use `fs.createReadStream(path, { start, end })` for partial reads\n3. Set appropriate response headers and status 206","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-01-08T23:20:27Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/68"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c686427f-0b45-346d-63cb-bd16cfc6a640 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CF64:1752F1:148D2A5:1A24A86:6B039EFD |
| html-safe-nonce | 9a2f848a1d821ca474191560cc0390542a26c5669063bfd284cf552ab21413c8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjY0OjE3NTJGMToxNDhEMkE1OjFBMjRBODY6NkIwMzlFRkQiLCJ2aXNpdG9yX2lkIjoiMzc3MDc1NDI3Mjg5MjAwMjA0NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9f0408c80d52ad7627ef0ba9ed910b4dbb5380e92ed8ff0af758ca18f646b839 |
| hovercard-subject-tag | issue:3794810234 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/JavaScriptSolidServer/68/issue_layout |
| twitter:image | https://opengraph.githubassets.com/07868c9bfe20dc49f6b5099b954490e72ea99badaec16fc06b57fa943c442470/JavaScriptSolidServer/JavaScriptSolidServer/issues/68 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/07868c9bfe20dc49f6b5099b954490e72ea99badaec16fc06b57fa943c442470/JavaScriptSolidServer/JavaScriptSolidServer/issues/68 |
| og:image:alt | Summary JSS currently doesn't support HTTP Range requests, which means video/audio seeking (skipping forward/back) doesn't work. Current Behavior When a client requests a byte range (e.g., seeking ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | melvincarvalho |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 958025407 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 958025407 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width