feat: Implement Electron frontend setup and voice chat functionality using LiveKit and Convex.
All checks were successful
Build and Release / build-and-release (push) Successful in 9m29s

This commit is contained in:
Bryan1029384756
2026-02-11 15:21:20 -06:00
parent e773ab41ae
commit b3c2f66074
2 changed files with 18 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
{ {
"name": "discord", "name": "discord",
"private": true, "private": true,
"version": "1.0.4", "version": "1.0.5",
"description": "A Discord clone built with Convex, React, and Electron", "description": "A Discord clone built with Convex, React, and Electron",
"author": "Moyettes", "author": "Moyettes",
"type": "module", "type": "module",

View File

@@ -78,7 +78,23 @@ export const VoiceProvider = ({ children }) => {
setToken(lkToken); setToken(lkToken);
const newRoom = new Room({ adaptiveStream: false, dynacast: false, autoSubscribe: true }); const newRoom = new Room({
adaptiveStream: false,
dynacast: false,
autoSubscribe: true,
audioCaptureDefaults: {
autoGainControl: true,
echoCancellation: true,
noiseSuppression: true,
channelCount: 2,
sampleRate: 48000,
},
publishDefaults: {
audioPreset: { maxBitrate: 384_000 },
dtx: true,
red: true,
},
});
await newRoom.connect(import.meta.env.VITE_LIVEKIT_URL, lkToken); await newRoom.connect(import.meta.env.VITE_LIVEKIT_URL, lkToken);
await newRoom.localParticipant.setMicrophoneEnabled(!isMuted && !isDeafened); await newRoom.localParticipant.setMicrophoneEnabled(!isMuted && !isDeafened);