fix who initiates call, needs to be lower, not higher
This commit is contained in:
parent
6472800387
commit
79411437cf
1 changed files with 3 additions and 2 deletions
|
@ -73,10 +73,11 @@ export class Member {
|
||||||
this.localMedia = localMedia;
|
this.localMedia = localMedia;
|
||||||
// otherwise wait for it to connect
|
// otherwise wait for it to connect
|
||||||
let shouldInitiateCall;
|
let shouldInitiateCall;
|
||||||
|
// the lexicographically lower side initiates the call
|
||||||
if (this.member.userId === this.options.ownUserId) {
|
if (this.member.userId === this.options.ownUserId) {
|
||||||
shouldInitiateCall = this.deviceId < this.options.ownDeviceId;
|
shouldInitiateCall = this.deviceId > this.options.ownDeviceId;
|
||||||
} else {
|
} else {
|
||||||
shouldInitiateCall = this.member.userId < this.options.ownUserId;
|
shouldInitiateCall = this.member.userId > this.options.ownUserId;
|
||||||
}
|
}
|
||||||
if (shouldInitiateCall) {
|
if (shouldInitiateCall) {
|
||||||
this.peerCall = this._createPeerCall(makeId("c"));
|
this.peerCall = this._createPeerCall(makeId("c"));
|
||||||
|
|
Reference in a new issue