This commit is contained in:
parent
d224ccc52e
commit
87b4c1489e
@ -136,7 +136,7 @@ export default function (io: SocketServer, router: types.Router) {
|
||||
socket.data.username = username
|
||||
socket.data.rtpCapabilities = rtpCapabilities
|
||||
|
||||
const joinedSockets = await getJoinedSockets(socket.id)
|
||||
const joinedSockets = await getJoinedSockets()
|
||||
|
||||
cb(joinedSockets.map((s) => {
|
||||
return {
|
||||
@ -145,7 +145,7 @@ export default function (io: SocketServer, router: types.Router) {
|
||||
}
|
||||
}))
|
||||
|
||||
for (const joinedSocket of joinedSockets) {
|
||||
for (const joinedSocket of joinedSockets.filter(joinedSocket => joinedSocket.id !== socket.id)) {
|
||||
for (const producer of joinedSocket.data.producers.values()) {
|
||||
createConsumer(
|
||||
socket,
|
||||
@ -259,8 +259,7 @@ export default function (io: SocketServer, router: types.Router) {
|
||||
|
||||
cb({ id: producer.id })
|
||||
|
||||
const sockets = await namespace.fetchSockets()
|
||||
const otherSockets = sockets.filter(s => s.id !== socket.id)
|
||||
const otherSockets = await namespace.fetchSockets(socket.id)
|
||||
|
||||
for (const otherSocket of otherSockets) {
|
||||
createConsumer(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user