From aeaea476094a93021d91fa621f3bfd246ab39469 Mon Sep 17 00:00:00 2001 From: opti1337 Date: Thu, 29 Jan 2026 21:40:56 +0600 Subject: [PATCH] client volumes and dominant client --- server/socket/webrtc.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/socket/webrtc.ts b/server/socket/webrtc.ts index 6331080..358df1c 100644 --- a/server/socket/webrtc.ts +++ b/server/socket/webrtc.ts @@ -22,10 +22,10 @@ export default async function (io: SocketServer, router: types.Router) { audioLevelObserver.on('volumes', async (volumes: types.AudioLevelObserverVolume[]) => { namespace.emit('speakingPeers', volumes.map(({ producer, volume }) => { - const { clientId } = producer.appData as { clientId: ChadClient['socketId'] } + const { socketId } = producer.appData as { socketId: ChadClient['socketId'] } return { - clientId, + clientId: socketId, volume, } })) @@ -37,9 +37,9 @@ export default async function (io: SocketServer, router: types.Router) { }) activeSpeakerObserver.on('dominantspeaker', ({ producer }) => { - const { clientId } = producer.appData as { clientId: ChadClient['socketId'] } + const { socketId } = producer.appData as { socketId: ChadClient['socketId'] } - namespace.emit('activeSpeaker', clientId) + namespace.emit('activeSpeaker', socketId) }) namespace.on('connection', async (socket) => {