1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-01 04:43:29 +03:00

Simplifie some code

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner
2021-08-15 12:58:38 +02:00
parent 4da49d926b
commit 408976a199

View File

@@ -725,10 +725,7 @@ export class MatrixCall extends EventEmitter {
if (this.state === CallState.WaitLocalMedia) { if (this.state === CallState.WaitLocalMedia) {
logger.debug("Telling new call to wait for local media"); logger.debug("Telling new call to wait for local media");
newCall.waitForLocalAVStream = true; newCall.waitForLocalAVStream = true;
} else if (this.state === CallState.CreateOffer) { } else if ([CallState.CreateOffer, CallState.InviteSent].includes(this.state)) {
logger.debug("Handing local stream to new call");
newCall.gotUserMediaForAnswer(this.localUsermediaStream);
} else if (this.state === CallState.InviteSent) {
logger.debug("Handing local stream to new call"); logger.debug("Handing local stream to new call");
newCall.gotUserMediaForAnswer(this.localUsermediaStream); newCall.gotUserMediaForAnswer(this.localUsermediaStream);
} }