mirror of
https://github.com/darksaid98/mediaplex.git
synced 2026-12-04 06:28:50 +00:00
chore: docs
This commit is contained in:
1 parent
8930e684b9
commit
4cd162e064
1 file changed
+1
-6
@@ -58,7 +58,7 @@ console.log(result);
|
|||||||
```
|
```
|
||||||
|
|
||||||
This will output an object containing information about the media file, including the number of channels, sample rate, codec, duration, and metadata.
|
This will output an object containing information about the media file, including the number of channels, sample rate, codec, duration, and metadata.
|
||||||
The default probe size is `10MB`, but you can adjust this as needed by passing the second argument to `probeStream`:
|
The default probe size is `2MB`, but you can adjust this as needed by passing the second argument to `probeStream`:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// probe only 1024 bytes
|
// probe only 1024 bytes
|
||||||
@@ -68,11 +68,6 @@ const { result } = await mediaplex.probeStream(stream, 1024);
|
|||||||
const { result } = await mediaplex.probeStream(stream, 5 * 1024 * 1024);
|
const { result } = await mediaplex.probeStream(stream, 5 * 1024 * 1024);
|
||||||
```
|
```
|
||||||
|
|
||||||
// add a note
|
|
||||||
|
|
||||||
> ⚠️
|
|
||||||
> Probing a stream is non-blocking as it is done in a worker thread. But probing a buffer is a blocking operation.
|
|
||||||
|
|
||||||
## Opus Encoder
|
## Opus Encoder
|
||||||
|
|
||||||
Mediaplex also includes an Opus encoder/decoder, which can be used as a drop-in replacement for [`@discordjs/opus`](https://github.com/discordjs/opus). Here's an example on how to use it:
|
Mediaplex also includes an Opus encoder/decoder, which can be used as a drop-in replacement for [`@discordjs/opus`](https://github.com/discordjs/opus). Here's an example on how to use it:
|
||||||
|
|||||||
Reference in new issue
Block a user