Comparing version 2.1.0 to 2.1.1
@@ -83,8 +83,11 @@ /** | ||
/** | ||
* This is essentially a wrapper around `StreamTarget` with the intention of simplifying the use of this library with | ||
* the File System Access API. Writing the file directly to disk as it's being created comes with many benefits, such as | ||
* creating files way larger than the available RAM. | ||
* This is essentially a wrapper around a chunked `StreamTarget` with the intention of simplifying the use of this | ||
* library with the File System Access API. Writing the file directly to disk as it's being created comes with many | ||
* benefits, such as creating files way larger than the available RAM. | ||
*/ | ||
declare class FileSystemWritableFileStreamTarget { | ||
constructor(stream: FileSystemWritableFileStream); | ||
constructor( | ||
stream: FileSystemWritableFileStream, | ||
options?: { chunkSize?: number } | ||
); | ||
} | ||
@@ -91,0 +94,0 @@ |
@@ -503,4 +503,5 @@ "use strict"; | ||
var FileSystemWritableFileStreamTarget = class { | ||
constructor(stream) { | ||
constructor(stream, options) { | ||
this.stream = stream; | ||
this.options = options; | ||
} | ||
@@ -790,2 +791,3 @@ }; | ||
constructor(target) { | ||
var _a; | ||
super(new StreamTarget( | ||
@@ -796,3 +798,5 @@ (data, position) => target.stream.write({ | ||
position | ||
}) | ||
}), | ||
void 0, | ||
{ chunkSize: (_a = target.options) == null ? void 0 : _a.chunkSize } | ||
)); | ||
@@ -799,0 +803,0 @@ } |
{ | ||
"name": "mp4-muxer", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "MP4 multiplexer in pure TypeScript with support for WebCodecs API, video & audio.", | ||
@@ -5,0 +5,0 @@ "main": "./build/mp4-muxer.js", |
@@ -151,6 +151,15 @@ # mp4-muxer - JavaScript MP4 multiplexer | ||
``` | ||
- `FileSystemWritableFileStreamTarget`: This is essentially a wrapper around `StreamTarget` with the intention of | ||
simplifying the use of this library with the File System Access API. Writing the file directly to disk as it's being | ||
created comes with many benefits, such as creating files way larger than the available RAM. | ||
- `FileSystemWritableFileStreamTarget`: This is essentially a wrapper around a chunked `StreamTarget` with the intention | ||
of simplifying the use of this library with the File System Access API. Writing the file directly to disk as it's | ||
being created comes with many benefits, such as creating files way larger than the available RAM. | ||
You can optionally override the default `chunkSize` of 16 MiB. | ||
```ts | ||
constructor( | ||
stream: FileSystemWritableFileStream, | ||
options?: { chunkSize?: number } | ||
); | ||
``` | ||
Usage example: | ||
```js | ||
@@ -157,0 +166,0 @@ import { Muxer, FileSystemWritableFileStreamTarget } from 'mp4-muxer'; |
57924
1252
276