#4
All checks were successful
Deploy / deploy (push) Successful in 44s

This commit is contained in:
Никита Круглицкий 2025-10-05 21:36:28 +06:00
parent c370a455bd
commit 1ea3b2d376

View File

@ -83,6 +83,7 @@ interface ClientToServerEvents {
} }
interface ServerToClientEvents { interface ServerToClientEvents {
newPeer: (arg: { id: string, username: string }) => void
producers: (arg: ProducerShort[]) => void producers: (arg: ProducerShort[]) => void
newConsumer: (arg: { newConsumer: (arg: {
peerId: string peerId: string
@ -153,6 +154,11 @@ export default function (io: SocketServer, router: types.Router) {
) )
} }
} }
socket.broadcast.emit('newPeer', {
id: socket.id,
username,
})
}) })
socket.on('getRtpCapabilities', (cb) => { socket.on('getRtpCapabilities', (cb) => {