hzrd149 / blossom-server

Blobs stored simply on mediaservers
MIT License
22 stars 8 forks source link

iOS: add range header requests so videos hosted on Blossom play on iOS media player #16

Open alltheseas opened 1 day ago

alltheseas commented 1 day ago

what happens

video files (e.g. mp4) stored on blossom cannot be played by iOS media player in an iOS app (e.g. Damus)

suggestion

devs suggest investigating lack of/iOS media player need for headers

haven [response] is missing:

content-length accept-ranges: bytes

it's possible ios video player requires one of these

haven request is missing:

probably uses ranges for incremental downloading if the connection drops

Https://njump.me/note1pn7mlejhesw68qw8l9435mau6ff6ae3fcrcuuh7alkjszw6ry5cq0gsyp7

alltheseas commented 1 day ago

fwiw im not sure if it is the issue, its just the biggest thing i saw that was different between the headers of the server responses. Would be good to know which header specifically is the issue, assuming both servers are returning the same data and there isn’t some other subtle issue.

alltheseas commented 1 day ago

Not sure if this is the solution:

https://njump.me/note1d9g45t7pe58zzhq2c8dyq9u7wrnh77e2xafju58mfkmk3akh0unsypga93

https://njump.me/note15tlfjsjw9llvm93qd0rl7uk8p9fkhwvgxpvnxpp8s32sghunxa3s5r7u94

hzrd149 commented 1 day ago

Added support for range requests in https://github.com/hzrd149/blossom-server/commit/19fc1266cfd1ddba15a204c35a2df5bb8f3fdccb with https://github.com/koajs/koa-range

RFC for range requests https://www.rfc-editor.org/rfc/rfc7233#section-3