textileio / go-textile

[DEPRECATED] Textile is a set of tools and infrastructure for building composable apps and services on the IPFS network
https://textile.io
MIT License
357 stars 43 forks source link

Implement a Range header support for streaming/seeking video/audio files #843

Open mysliwiec-tech opened 5 years ago

mysliwiec-tech commented 5 years ago

Is your feature request related to a problem? Sometimes it would be required for a gateway to return a specific range of bytes of the big file served eg. when we have a video or an audio and we would like to start playing it from a specific point of time. It will be possible due to accepting the Range HTTP headers in the requests and sending back the response with HTTP 206 with Content-Range header. I'm not really technical, but this is what might be needed in my understanding.

Describe the solution you'd like The technical details are explained in the issue of another project here and there

Additional context Raising this feature request as it was suggested by @andrewxhill and @carsonfarmer on Slack

mysliwiec-tech commented 5 years ago

I think what is required to do is to redefine the reader in the DataAtPath function in ipfs/main.go line 50, with different reader which will accept range parameter.