mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-09 00:33:46 +02:00
Skip single-byte buffer when reading through UrlSource for range request
This commit is contained in:
@@ -314,8 +314,10 @@ export class UrlSource extends Source {
|
||||
} else if (rangeResponse.status === 200) {
|
||||
// The server just returned the whole thing
|
||||
this._fullData = await rangeResponse.arrayBuffer();
|
||||
if (this._fullData.byteLength !== 1) {
|
||||
return this._fullData.byteLength;
|
||||
}
|
||||
}
|
||||
|
||||
// If the range request didn't provide the size, make a full GET request
|
||||
const { response } = await this._makeRequest();
|
||||
|
||||
Reference in New Issue
Block a user