And now I’ve added HTTP Range support.
❤️ to the axum-range crate which made this much simpler. (Though I did have to delve deeper into Rust async than I have before. But I was happy to learn more there.)
Here’s a sample video which I saw making the rounds on Mastodon earlier this week:
https://nfnitloop.com/nostr/files/fb8e82bed22cf9c8ee39ef2898970beee6fec7ca9068e1506a061f22f5ec1ae7/
Note that only the first part of the video is fetched. You can jump past that and the server will start loading from the exact point you jump to.
The algorithm the server uses to answer these range requests could also be implemented client-side. (Say, as the Blob interface in the browser.) I’m just not implementing a client. (Yet. 😉)