annevk / orb

Opaque Response Blocking (CORB++)
Creative Commons Zero v1.0 Universal
35 stars 5 forks source link

ORB uses `audio-or-video-type-pattern-matching-algorithm` in an indeterministic way. #40

Open farre opened 1 year ago

farre commented 1 year ago

When sniffing in an audio or video context to achieve a deterministic sniff in a majority of cases, the number of bytes sniffed needs to be more than or equal to 1445. ORB asks for 1024. We should at least change this to be reading-the-resource-header instead.

A caveat here is that this might not be enough. In some cases we need up to 8k for aac in adts (I'm citing stuff I've learned from @padenot here), but we should at least do 1445, which we would do if we change to using reading-the-resource-header.

farre commented 1 year ago

There also seems to be instances of sites streaming media, where streaming doesn't start at the beginning, which complicates things.

C.f. bugzilla 1827684