mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 19:03:46 +02:00
Small adjustments to getSize change
This commit is contained in:
+2
-2
@@ -14,8 +14,8 @@ export abstract class Source {
|
||||
_sizePromise: Promise<number> | null = null;
|
||||
|
||||
/**
|
||||
* Returns promise that resolves with the size of the file.
|
||||
* If the size is not known, it will be retrieved from the source.
|
||||
* Resolves with the total size of the file in bytes. This function is memoized, meaning only the first call
|
||||
* will retrieve the size.
|
||||
*/
|
||||
getSize() {
|
||||
return this._sizePromise ??= this._retrieveSize();
|
||||
|
||||
Reference in New Issue
Block a user