This commit is contained in:
parent
c370a455bd
commit
1ea3b2d376
@ -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) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user