mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-03 05:43:50 +02:00
Small fixes
This commit is contained in:
@@ -532,11 +532,13 @@ const source = new StreamSource({
|
|||||||
The options of `StreamSource` have the following type:
|
The options of `StreamSource` have the following type:
|
||||||
```ts
|
```ts
|
||||||
type StreamSourceOptions = {
|
type StreamSourceOptions = {
|
||||||
getSize: () => number | Promise<number>;
|
getSize: () => MaybePromise<number>;
|
||||||
read: (start: number, end: number) => Uint8Array | Promise<Uint8Array>;
|
read: (start: number, end: number) => MaybePromise<Uint8Array | ReadableStream<Uint8Array>>;
|
||||||
maxCacheSize?: number;
|
maxCacheSize?: number;
|
||||||
prefetchProfile?: 'none' | 'fileSystem' | 'network';
|
prefetchProfile?: 'none' | 'fileSystem' | 'network';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type MaybePromise<T> = T | Promise<T>;
|
||||||
```
|
```
|
||||||
|
|
||||||
- `getSize`\
|
- `getSize`\
|
||||||
|
|||||||
+2
-2
@@ -8,11 +8,11 @@
|
|||||||
"packages/*"
|
"packages/*"
|
||||||
],
|
],
|
||||||
"main": "./dist/bundles/mediabunny.cjs",
|
"main": "./dist/bundles/mediabunny.cjs",
|
||||||
"module": "./dist/bundles/mediabunny.mjs",
|
"module": "./dist/modules/src/index.js",
|
||||||
"types": "./dist/modules/src/index.d.ts",
|
"types": "./dist/modules/src/index.d.ts",
|
||||||
"exports": {
|
"exports": {
|
||||||
"types": "./dist/modules/src/index.d.ts",
|
"types": "./dist/modules/src/index.d.ts",
|
||||||
"import": "./dist/bundles/mediabunny.mjs",
|
"import": "./dist/modules/src/index.js",
|
||||||
"require": "./dist/bundles/mediabunny.cjs"
|
"require": "./dist/bundles/mediabunny.cjs"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
|||||||
Reference in New Issue
Block a user