Added logs on transport-produce
This commit is contained in:
parent
d1eb7afc3a
commit
d324528d52
14
app.js
14
app.js
@ -297,15 +297,16 @@ peers.on('connection', async socket => {
|
|||||||
*/
|
*/
|
||||||
socket.on('transport-produce', async ({ kind, rtpParameters, appData }, callback) => {
|
socket.on('transport-produce', async ({ kind, rtpParameters, appData }, callback) => {
|
||||||
try {
|
try {
|
||||||
const callId = socketDetails[socket.id];
|
const callId = socketDetails[socket.id];
|
||||||
if (typeof rtpParameters === 'string') rtpParameters = JSON.parse(rtpParameters);
|
if (typeof rtpParameters === 'string') rtpParameters = JSON.parse(rtpParameters);
|
||||||
|
|
||||||
console.log(`[transport-produce] kind: ${kind} | socket.id: ${socket.id} | callId: ${callId}`);
|
|
||||||
console.log('kind', kind);
|
|
||||||
console.log('rtpParameters', rtpParameters);
|
|
||||||
|
|
||||||
|
console.log(`[transport-produce] kind: ${kind} | socket.id: ${socket.id} | callId: ${callId}`);
|
||||||
|
console.log('kind', kind);
|
||||||
|
console.log('rtpParameters', rtpParameters);
|
||||||
|
console.log('isInitiator()', isInitiator());
|
||||||
if (kind === 'video') {
|
if (kind === 'video') {
|
||||||
if (!isInitiator()) {
|
if (!isInitiator()) {
|
||||||
|
console.log('----------1');
|
||||||
videoCalls[callId].receiverVideoProducer = await videoCalls[callId].receiverProducerTransport.produce({
|
videoCalls[callId].receiverVideoProducer = await videoCalls[callId].receiverProducerTransport.produce({
|
||||||
kind,
|
kind,
|
||||||
rtpParameters,
|
rtpParameters,
|
||||||
@ -337,6 +338,7 @@ peers.on('connection', async socket => {
|
|||||||
// id: videoCalls[callId].producerVideo.id
|
// id: videoCalls[callId].producerVideo.id
|
||||||
// });
|
// });
|
||||||
} else {
|
} else {
|
||||||
|
console.log('----------2');
|
||||||
videoCalls[callId].initiatorVideoProducer = await videoCalls[callId].initiatorProducerTransport.produce({
|
videoCalls[callId].initiatorVideoProducer = await videoCalls[callId].initiatorProducerTransport.produce({
|
||||||
kind,
|
kind,
|
||||||
rtpParameters,
|
rtpParameters,
|
||||||
|
Loading…
Reference in New Issue
Block a user