Fix isInitiator in transport-produce
This commit is contained in:
parent
d324528d52
commit
f8fcfb3165
6
app.js
6
app.js
@ -303,9 +303,9 @@ peers.on('connection', async socket => {
|
||||
console.log(`[transport-produce] kind: ${kind} | socket.id: ${socket.id} | callId: ${callId}`);
|
||||
console.log('kind', kind);
|
||||
console.log('rtpParameters', rtpParameters);
|
||||
console.log('isInitiator()', isInitiator());
|
||||
console.log('isInitiator()', isInitiator(callId, socket.id));
|
||||
if (kind === 'video') {
|
||||
if (!isInitiator()) {
|
||||
if (!isInitiator(callId, socket.id)) {
|
||||
console.log('----------1');
|
||||
videoCalls[callId].receiverVideoProducer = await videoCalls[callId].receiverProducerTransport.produce({
|
||||
kind,
|
||||
@ -357,7 +357,7 @@ peers.on('connection', async socket => {
|
||||
});
|
||||
}
|
||||
} else if (kind === 'audio') {
|
||||
if (!isInitiator()) {
|
||||
if (!isInitiator(callId, socket.id)) {
|
||||
videoCalls[callId].receiverAudioProducer = await videoCalls[callId].receiverProducerTransport.produce({
|
||||
kind,
|
||||
rtpParameters,
|
||||
|
Loading…
Reference in New Issue
Block a user