update incoming call event handler
This commit is contained in:
parent
e2b5d161cb
commit
0305fe7974
1 changed files with 10 additions and 18 deletions
|
@ -144,24 +144,16 @@ export class ConferenceCall extends EventEmitter {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// HACK: Horrible hack necessary because callHandler sets opponentMember
|
if (call.opponentMember) {
|
||||||
// asynchronously before emitting the Call.incoming event.
|
const userId = call.opponentMember.userId;
|
||||||
const pollOpponentMember = () => {
|
this._addCall(call, userId);
|
||||||
if (call.opponentMember) {
|
console.debug(
|
||||||
const userId = call.opponentMember.userId;
|
"_onIncomingCall",
|
||||||
this._addCall(call, userId);
|
`Answering incoming call ${call.callId} from ${userId}`
|
||||||
console.debug(
|
);
|
||||||
"_onIncomingCall",
|
call.answer();
|
||||||
`Answering incoming call ${call.callId} from ${userId}`
|
return;
|
||||||
);
|
}
|
||||||
call.answer();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
setTimeout(pollOpponentMember, 100);
|
|
||||||
};
|
|
||||||
|
|
||||||
pollOpponentMember();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_addCall(call, userId) {
|
_addCall(call, userId) {
|
||||||
|
|
Loading…
Reference in a new issue