LINXD-2270-p2 #19

Closed
sergiu wants to merge 58 commits from LINXD-2270-p2 into develop
2 changed files with 5 additions and 2 deletions
Showing only changes of commit acd6025f59 - Show all commits

5
app.js
View File

@ -223,8 +223,11 @@ peers.on('connection', async socket => {
- If the client is producer(sender: true) then it will use parameters for device.createSendTransport(params) - If the client is producer(sender: true) then it will use parameters for device.createSendTransport(params)
- If the client is a consumer(sender: false) then it will use parameters for device.createRecvTransport(params) - If the client is a consumer(sender: false) then it will use parameters for device.createRecvTransport(params)
*/ */
socket.on('createWebRtcTransport', async ({ sender }, callback) => { socket.on('createWebRtcTransport', async (data, callback) => {
try { try {
console.log('createWebRtcTransport-----------------------data', data);
const { sender } = data
console.log('createWebRtcTransport-----------------------sender', sender);
const callId = socketDetails[socket.id]; const callId = socketDetails[socket.id];
console.log(`[createWebRtcTransport] socket ${socket.id} | sender ${sender} | callId ${callId}`); console.log(`[createWebRtcTransport] socket ${socket.id} | sender ${sender} | callId ${callId}`);
if (sender) { if (sender) {

View File

@ -222,7 +222,7 @@ const createSendTransport = () => {
console.log('[createSendTransport'); console.log('[createSendTransport');
// see server's socket.on('createWebRtcTransport', sender?, ...) // see server's socket.on('createWebRtcTransport', sender?, ...)
// this is a call from Producer, so sender = true // this is a call from Producer, so sender = true
socket.emit('createWebRtcTransport', { sender: true, callId }, (value) => { socket.emit('createWebRtcTransport', { sender: true }, (value) => {
console.log(`[createWebRtcTransport] value: ${JSON.stringify(value)}`); console.log(`[createWebRtcTransport] value: ${JSON.stringify(value)}`);