fixed memory leak; removed unit tests;

This commit is contained in:
Lechner Julian - FrauJulian
2025-08-02 17:55:25 +02:00
parent 94328ef054
commit 4d3351d81e
6 changed files with 7381 additions and 7691 deletions
+25 -1
View File
@@ -18,9 +18,32 @@ Please create an [issue](https://github.com/FrauJulian/DiscordAudioStreamNPM/iss
### Install package
```bash
npm install discord-audio-stream opusscript @discordjs/voice ffmpeg-static sodium-native
npm install discord-audio-stream
yarn add discord-audio-stream
pnpm add discord-audio-stream
bun add discord-audio-stream
```
**Encryption Libraries (npm install):**
> You only need to install one of these libraries if your system does not support `aes-256-gcm` (verify by running `require('node:crypto').getCiphers().includes('aes-256-gcm')`).
- `sodium-native`
- `sodium`
- `@stablelib/xchacha20poly1305`
- `@noble/ciphers`
- `libsodium-wrappers`
**Opus Libraries (npm install):**
- `@discordjs/opus`
- `opusscript`
**FFmpeg:**
- [`FFmpeg`](https://ffmpeg.org/) (installed and added to environment)
- `ffmpeg-static`
### Create Instance
```js
@@ -65,6 +88,7 @@ let audioManager = new AudioManager({
| `StopAudioOnConnection` | | void | Method to stop the audio without destroying voice connection. |
| `CreateConnectionAndPlayAudio` | | void | Method to join the voice connection and play audio. |
| `DestroyConnection` | | void | Method to destroy the voice connection. |
| `Dispose` | | void | Dispose all data in object. |
| `SetVolume` | `volume` (type of number, 0 - 100 percent) | void | Method to set the audio volume. | Method to set the volume of the audio. |
| `SetMaxListeners` | `maxListeners` (type of number) | void | Method to set the max listeners of the audio stream. |