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