client volumes and dominant client
All checks were successful
Deploy / deploy (push) Successful in 33s

This commit is contained in:
2026-01-29 21:40:56 +06:00
parent f4fd752448
commit aeaea47609

View File

@@ -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) => {