Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support range requests #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

hannahhoward
Copy link
Contributor

Goals

Support range requests in the service worker, allowing audio and video content to be loaded.

Requires an update to the JS Client once filecoin-saturn/js-client#48 merges

Implementation

  • removes audio/video exclusion -- note that while we now support most variants of range requests, we don't support requests for multiple ranges at once (Range: bytes=0-1000, 1500-2000), and we probably should add a check that excludes these requests. I don't believe the browser tends to use this for audio/video though maybe @gruns knows, but it needs further investigation.
  • add a function to parse the string syntax of the range header and turn it into the range object that is expected by the JS client
  • parse range header in the interceptor and pass it in the options to the JSClient
  • unit test for range parsing function

Next Steps

  • as stated, probably need to exclude multi-range requests from our worker (we may be able to handle this, but it's non-trivial
  • need to update with the new JS client once merged
  • this needs multiple levels of testing before we release to clients.

also removes audio/video exclusion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant