mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-03 05:43:50 +02:00
Merge pull request #60 from devPablo/main
Fix UrlSource single-byte buffer on Range Request HTTP 200
This commit is contained in:
@@ -314,7 +314,11 @@ export class UrlSource extends Source {
|
|||||||
} else if (rangeResponse.status === 200) {
|
} else if (rangeResponse.status === 200) {
|
||||||
// The server just returned the whole thing
|
// The server just returned the whole thing
|
||||||
this._fullData = await rangeResponse.arrayBuffer();
|
this._fullData = await rangeResponse.arrayBuffer();
|
||||||
|
if (this._fullData.byteLength !== 1) {
|
||||||
return this._fullData.byteLength;
|
return this._fullData.byteLength;
|
||||||
|
} else {
|
||||||
|
// The server responded with 200, but returned only the requested range, so skip the response
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the range request didn't provide the size, make a full GET request
|
// If the range request didn't provide the size, make a full GET request
|
||||||
|
|||||||
Reference in New Issue
Block a user