Merge pull request #78 from J3vb/feature/livekit-migration

feat: LiveKit voice fixes + v1.3.0
This commit is contained in:
J3vb
2026-03-22 21:11:57 +01:00
committed by GitHub
5 changed files with 18 additions and 8 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "owncord-client",
"private": true,
"version": "1.2.0",
"version": "1.3.0",
"type": "module",
"scripts": {
"dev": "vite",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "owncord-client"
version = "1.2.0"
version = "1.3.0"
edition = "2021"
description = "OwnCord Desktop Client"
@@ -1,6 +1,6 @@
{
"productName": "OwnCord",
"version": "1.2.0",
"version": "1.3.0",
"identifier": "com.owncord.client",
"build": {
"frontendDist": "../dist",
@@ -88,7 +88,6 @@ export class LiveKitSession {
const newRoom = new Room({
adaptiveStream: true,
dynacast: true,
webAudioMix: true,
audioCaptureDefaults: {
echoCancellation: loadPref("echoCancellation", true),
noiseSuppression: loadPref("noiseSuppression", true),
@@ -111,13 +110,14 @@ export class LiveKitSession {
): void => {
const userId = parseUserId(participant.identity);
if (track.kind === Track.Kind.Audio) {
// Attach creates an <audio> element — required for playback
// Detach any previous <audio> elements to prevent duplicate playback
// on fast reconnects (new subscription fires before old unsubscription)
for (const el of track.detach()) el.remove();
const audioEl = track.attach();
audioEl.style.display = "none";
document.body.appendChild(audioEl);
// Apply saved per-user volume scaled by master output volume
const savedVolume = userId > 0 ? getSavedUserVolume(userId) : 100;
audioEl.volume = Math.min(savedVolume, 100) / 100;
// Apply saved per-user volume via LiveKit's setVolume (supports 0-2.0 range)
participant.setVolume(this.getEffectiveVolume(userId));
const savedOutput = loadPref<string>("audioOutputDevice", "");
if (savedOutput !== "" && typeof audioEl.setSinkId === "function") {
audioEl.setSinkId(savedOutput).catch((err) => {
+10
View File
@@ -58,14 +58,24 @@ func (p *LiveKitProcess) generateConfig() (string, error) {
content := fmt.Sprintf(`# Auto-generated by OwnCord — do not edit manually.
port: 7880
rtc:
port_range_start: 50000
port_range_end: 60000
use_external_ip: true
pli_throttle:
low_quality: 500ms
mid_quality: 1s
high_quality: 1s
keys:
"%s": "%s"
logging:
level: info
audio:
active_loopback_prevention: true
`, p.cfg.LiveKitAPIKey, p.cfg.LiveKitAPISecret)
if err := os.MkdirAll(p.dataDir, 0o755); err != nil {