mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 02:43:48 +02:00
Add xingHeader option to Mp3OutputFormat
This commit is contained in:
@@ -206,11 +206,17 @@ const output = new Output({
|
||||
The following options are available:
|
||||
```ts
|
||||
type Mp3OutputFormatOptions = {
|
||||
xingHeader?: boolean;
|
||||
onXingFrame?: (data: Uint8Array, position: number) => unknown;
|
||||
};
|
||||
```
|
||||
- `xingHeader`\
|
||||
Controls whether the Xing header, which contains additional metadata as well as an index, is written to the start of the MP3 file. Defaults to `true`.
|
||||
::: info
|
||||
When set to `false`, this option ensures [append-only writing](#append-only-writing).
|
||||
:::
|
||||
- `onXingFrame`\
|
||||
Will be called once the Xing metadata frame is finalized, which happens at the end of the writing process.
|
||||
Will be called once the Xing metadata frame is finalized, which happens at the end of the writing process. This callback only fires if `xingHeader` isn't set to `false`.
|
||||
|
||||
::: info
|
||||
Most browsers don't support encoding MP3. Use the official [`@mediabunny/mp3-encoder`](./extensions/mp3-encoder) package to polyfill an encoder.
|
||||
|
||||
Reference in New Issue
Block a user