client volumes and dominant client
All checks were successful
Deploy / deploy (push) Successful in 33s
All checks were successful
Deploy / deploy (push) Successful in 33s
This commit is contained in:
@@ -22,10 +22,10 @@ export default async function (io: SocketServer, router: types.Router) {
|
|||||||
|
|
||||||
audioLevelObserver.on('volumes', async (volumes: types.AudioLevelObserverVolume[]) => {
|
audioLevelObserver.on('volumes', async (volumes: types.AudioLevelObserverVolume[]) => {
|
||||||
namespace.emit('speakingPeers', volumes.map(({ producer, volume }) => {
|
namespace.emit('speakingPeers', volumes.map(({ producer, volume }) => {
|
||||||
const { clientId } = producer.appData as { clientId: ChadClient['socketId'] }
|
const { socketId } = producer.appData as { socketId: ChadClient['socketId'] }
|
||||||
|
|
||||||
return {
|
return {
|
||||||
clientId,
|
clientId: socketId,
|
||||||
volume,
|
volume,
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
@@ -37,9 +37,9 @@ export default async function (io: SocketServer, router: types.Router) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
activeSpeakerObserver.on('dominantspeaker', ({ producer }) => {
|
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) => {
|
namespace.on('connection', async (socket) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user