LINXD-2329: Don't close the call if initiator or receiver close the transport #28
@ -20359,8 +20359,7 @@ module.exports = {
|
|||||||
const io = require('socket.io-client')
|
const io = require('socket.io-client')
|
||||||
const mediasoupClient = require('mediasoup-client')
|
const mediasoupClient = require('mediasoup-client')
|
||||||
const urlParams = new URLSearchParams(location.search);
|
const urlParams = new URLSearchParams(location.search);
|
||||||
const config = require('./config');
|
const config = require('./config')
|
||||||
const { connect } = require('socket.io-client');
|
|
||||||
console.log('[CONFIG]', config);
|
console.log('[CONFIG]', config);
|
||||||
|
|
||||||
const ASSET_ID = parseInt(urlParams.get('assetId')) || null;
|
const ASSET_ID = parseInt(urlParams.get('assetId')) || null;
|
||||||
@ -20580,10 +20579,6 @@ const createDevice = async () => {
|
|||||||
routerRtpCapabilities: rtpCapabilities
|
routerRtpCapabilities: rtpCapabilities
|
||||||
})
|
})
|
||||||
|
|
||||||
device.observer.on("newtransport", (transport) => {
|
|
||||||
consume()
|
|
||||||
})
|
|
||||||
|
|
||||||
console.log('Device RTP Capabilities', device.rtpCapabilities)
|
console.log('Device RTP Capabilities', device.rtpCapabilities)
|
||||||
console.log('[createDevice] device', device);
|
console.log('[createDevice] device', device);
|
||||||
|
|
||||||
@ -20740,6 +20735,7 @@ const connectSendTransport = async () => {
|
|||||||
// Enable Close call button
|
// Enable Close call button
|
||||||
const closeCallBtn = document.getElementById('btnCloseCall');
|
const closeCallBtn = document.getElementById('btnCloseCall');
|
||||||
closeCallBtn.removeAttribute('disabled');
|
closeCallBtn.removeAttribute('disabled');
|
||||||
|
consume()
|
||||||
}
|
}
|
||||||
|
|
||||||
const createRecvTransport = async () => {
|
const createRecvTransport = async () => {
|
||||||
@ -20779,7 +20775,11 @@ const createRecvTransport = async () => {
|
|||||||
errback(error)
|
errback(error)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
connectRecvTransport()
|
|
||||||
|
consumerTransport.observer.on("newproducer", (producer) => {
|
||||||
|
console.log("new producer created [id:%s]", producer.id);
|
||||||
|
});
|
||||||
|
// connectRecvTransport()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
const io = require('socket.io-client')
|
const io = require('socket.io-client')
|
||||||
const mediasoupClient = require('mediasoup-client')
|
const mediasoupClient = require('mediasoup-client')
|
||||||
const urlParams = new URLSearchParams(location.search);
|
const urlParams = new URLSearchParams(location.search);
|
||||||
const config = require('./config');
|
const config = require('./config')
|
||||||
const { connect } = require('socket.io-client');
|
|
||||||
console.log('[CONFIG]', config);
|
console.log('[CONFIG]', config);
|
||||||
|
|
||||||
const ASSET_ID = parseInt(urlParams.get('assetId')) || null;
|
const ASSET_ID = parseInt(urlParams.get('assetId')) || null;
|
||||||
@ -222,10 +221,6 @@ const createDevice = async () => {
|
|||||||
routerRtpCapabilities: rtpCapabilities
|
routerRtpCapabilities: rtpCapabilities
|
||||||
})
|
})
|
||||||
|
|
||||||
device.observer.on("newtransport", (transport) => {
|
|
||||||
consume()
|
|
||||||
})
|
|
||||||
|
|
||||||
console.log('Device RTP Capabilities', device.rtpCapabilities)
|
console.log('Device RTP Capabilities', device.rtpCapabilities)
|
||||||
console.log('[createDevice] device', device);
|
console.log('[createDevice] device', device);
|
||||||
|
|
||||||
@ -382,6 +377,7 @@ const connectSendTransport = async () => {
|
|||||||
// Enable Close call button
|
// Enable Close call button
|
||||||
const closeCallBtn = document.getElementById('btnCloseCall');
|
const closeCallBtn = document.getElementById('btnCloseCall');
|
||||||
closeCallBtn.removeAttribute('disabled');
|
closeCallBtn.removeAttribute('disabled');
|
||||||
|
consume()
|
||||||
}
|
}
|
||||||
|
|
||||||
const createRecvTransport = async () => {
|
const createRecvTransport = async () => {
|
||||||
@ -421,7 +417,11 @@ const createRecvTransport = async () => {
|
|||||||
errback(error)
|
errback(error)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
connectRecvTransport()
|
|
||||||
|
consumerTransport.observer.on("newproducer", (producer) => {
|
||||||
|
console.log("new producer created [id:%s]", producer.id);
|
||||||
|
});
|
||||||
|
// connectRecvTransport()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user