mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 02:43:48 +02:00
Fix UrlSource for small files
This commit is contained in:
+1
-1
@@ -316,7 +316,7 @@ export class UrlSource extends Source {
|
|||||||
|
|
||||||
if (response.status === 206) {
|
if (response.status === 206) {
|
||||||
fileSize = this._getPartialLengthFromRangeResponse(response);
|
fileSize = this._getPartialLengthFromRangeResponse(response);
|
||||||
worker = this._orchestrator.createWorker(0, URL_SOURCE_MIN_LOAD_AMOUNT);
|
worker = this._orchestrator.createWorker(0, Math.min(fileSize, URL_SOURCE_MIN_LOAD_AMOUNT));
|
||||||
} else {
|
} else {
|
||||||
// Server probably returned a 200.
|
// Server probably returned a 200.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user