test
This commit is contained in:
parent
c7049ef909
commit
1f3fbba5c0
53
app.js
53
app.js
@ -290,31 +290,36 @@ peers.on('connection', async socket => {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
const router = videoCalls[callId].router;
|
try {
|
||||||
|
const router = videoCalls[callId].router;
|
||||||
router.observer.on("newtransport", (transport) => {
|
|
||||||
transport.observer.on("newproducer", (producer) => {
|
router.observer.on("newtransport", (transport) => {
|
||||||
|
transport.observer.on("newproducer", (producer) => {
|
||||||
console.log(
|
|
||||||
"new producer created [worker.pid:%d, router.id:%s, transport.id:%s, producer.id:%s]",
|
console.log(
|
||||||
worker.pid, router.id, transport.id, producer.id
|
"new producer created [worker.pid:%d, router.id:%s, transport.id:%s, producer.id:%s]",
|
||||||
);
|
worker.pid, router.id, transport.id, producer.id
|
||||||
|
);
|
||||||
if (!isInitiator(callId, socket.id)) {
|
|
||||||
console.log('🟥 Emit to initiatorSocket');
|
if (!isInitiator(callId, socket.id)) {
|
||||||
videoCalls[callId].initiatorSocket.emit('new-producer', {
|
console.log('🟥 Emit to initiatorSocket');
|
||||||
callId
|
videoCalls[callId].initiatorSocket.emit('new-producer', {
|
||||||
});
|
callId
|
||||||
|
});
|
||||||
} else {
|
|
||||||
console.log('🟥 Emit to receiverSocket');
|
} else {
|
||||||
videoCalls[callId].receiverSocket.emit('new-producer', {
|
console.log('🟥 Emit to receiverSocket');
|
||||||
callId
|
videoCalls[callId].receiverSocket.emit('new-producer', {
|
||||||
});
|
callId
|
||||||
}
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
} catch (error) {
|
||||||
|
console.log('&&&&&&&&&&&&&&&&', error.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user