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
All checks were successful
Build and Release / build-and-release (push) Successful in 9m29s
This commit is contained in:
@@ -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",
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user