LINXD-2270-p2 #19
7
app.js
7
app.js
@ -223,12 +223,9 @@ 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 (data, callback) => {
|
socket.on('createWebRtcTransport', async ({ sender }, callback) => {
|
||||||
try {
|
try {
|
||||||
console.log('🟥 WARNING', JSON.stringify(data));
|
console.log('🟥', JSON.stringify(sender), socket.id);
|
||||||
console.log('createWebRtcTransport-----------------------data', data, 'socketid', socket.id);
|
|
||||||
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) {
|
||||||
|
@ -20580,9 +20580,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
|
||||||
console.log('EMIT sender: true!!!!!!!!!!!!!!!!!!!!');
|
socket.emit('createWebRtcTransport', { sender: true }, (value) => {
|
||||||
// const data1 = { sender: 'true123', test: '123', sender1: true };
|
|
||||||
socket.emit('createWebRtcTransport', { sender: 'true123', test: '123', sender1: true }, (value) => {
|
|
||||||
|
|
||||||
console.log(`[createWebRtcTransport] value: ${JSON.stringify(value)}`);
|
console.log(`[createWebRtcTransport] value: ${JSON.stringify(value)}`);
|
||||||
|
|
||||||
|
@ -222,9 +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
|
||||||
console.log('EMIT sender: true!!!!!!!!!!!!!!!!!!!!');
|
socket.emit('createWebRtcTransport', { sender: true }, (value) => {
|
||||||
// const data1 = { sender: 'true123', test: '123', sender1: true };
|
|
||||||
socket.emit('createWebRtcTransport', { sender: 'true123', test: '123', sender1: true }, (value) => {
|
|
||||||
|
|
||||||
console.log(`[createWebRtcTransport] value: ${JSON.stringify(value)}`);
|
console.log(`[createWebRtcTransport] value: ${JSON.stringify(value)}`);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user