feat: support multiple voice nodes

This commit is contained in:
Zomatree
2025-02-17 01:39:00 +00:00
parent 060b4c43f4
commit 367ac887f4
20 changed files with 209 additions and 83 deletions

View File

@@ -17,10 +17,11 @@ api = "http://local.revolt.chat/api"
events = "ws://local.revolt.chat/ws"
autumn = "http://local.revolt.chat/autumn"
january = "http://local.revolt.chat/january"
livekit = "ws://local.revolt.chat/livekit"
voso_legacy = ""
voso_legacy_ws = ""
[hosts.livekit]
[rabbit]
host = "rabbit"
port = 5672
@@ -64,13 +65,8 @@ hcaptcha_sitekey = ""
max_concurrent_connections = 50
[api.livekit]
# Livekit server url
url = "ws://local.revolt.chat/livekit"
# Livekit security key name
key = ""
# Livekit security secret value
secret = ""
[api.livekit.nodes]
[pushd]
# this changes the names of the queues to not overlap

View File

@@ -105,7 +105,7 @@ pub struct Hosts {
pub events: String,
pub autumn: String,
pub january: String,
pub livekit: String
pub livekit: HashMap<String, String>
}
#[derive(Deserialize, Debug, Clone)]
@@ -176,7 +176,14 @@ pub struct ApiWorkers {
#[derive(Deserialize, Debug, Clone)]
pub struct ApiLiveKit {
pub nodes: HashMap<String, LiveKitNode>
}
#[derive(Deserialize, Debug, Clone)]
pub struct LiveKitNode {
pub url: String,
pub lat: f64,
pub lon: f64,
pub key: String,
pub secret: String
}