fix: wrong audio address

This commit is contained in:
Pax1601 2024-12-10 20:40:47 +01:00
parent a4452aee94
commit c618a36072

View File

@ -94,7 +94,7 @@ export class AudioManager {
if (res === null) res = this.#address.match(/(?:http|https):\/\/(.+)/);
let wsAddress = res ? res[1] : this.#address;
if (this.#endpoint) this.#socket = new WebSocket(`wss://${wsAddress}/${this.#endpoint}`);
if (this.#endpoint) this.#socket = new WebSocket(`wss://${wsAddress}${this.#endpoint}`);
else if (this.#port) this.#socket = new WebSocket(`ws://${wsAddress}:${this.#port}`);
else console.error("The audio backend was enabled but no port/endpoint was provided in the configuration");