1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-02 17:02:31 +03:00

Merge remote-tracking branch 'upstream/develop' into feature/muting

This commit is contained in:
Šimon Brandner
2021-07-29 09:10:38 +02:00
2 changed files with 13 additions and 10 deletions

View File

@@ -393,6 +393,10 @@ export class MatrixCall extends EventEmitter {
return Boolean(this.opponentCaps && this.opponentCaps["m.call.transferee"]); return Boolean(this.opponentCaps && this.opponentCaps["m.call.transferee"]);
} }
public opponentSupportsDTMF(): boolean {
return Boolean(this.opponentCaps && this.opponentCaps["m.call.dtmf"]);
}
public getRemoteAssertedIdentity(): AssertedIdentity { public getRemoteAssertedIdentity(): AssertedIdentity {
return this.remoteAssertedIdentity; return this.remoteAssertedIdentity;
} }
@@ -1042,11 +1046,10 @@ export class MatrixCall extends EventEmitter {
[SDPStreamMetadataKey]: this.getLocalSDPStreamMetadata(), [SDPStreamMetadataKey]: this.getLocalSDPStreamMetadata(),
} as MCallAnswer; } as MCallAnswer;
if (this.client.supportsCallTransfer) { answerContent.capabilities = {
answerContent.capabilities = { 'm.call.transferee': this.client.supportsCallTransfer,
'm.call.transferee': true, 'm.call.dtmf': false,
}; };
}
// We have just taken the local description from the peerconnection which will // We have just taken the local description from the peerconnection which will
// contain all the local candidates added so far, so we can discard any candidates // contain all the local candidates added so far, so we can discard any candidates
@@ -1400,11 +1403,10 @@ export class MatrixCall extends EventEmitter {
content.description = this.peerConn.localDescription; content.description = this.peerConn.localDescription;
} }
if (this.client.supportsCallTransfer) { content.capabilities = {
content.capabilities = { 'm.call.transferee': this.client.supportsCallTransfer,
'm.call.transferee': true, 'm.call.dtmf': false,
}; };
}
content[SDPStreamMetadataKey] = this.getLocalSDPStreamMetadata(); content[SDPStreamMetadataKey] = this.getLocalSDPStreamMetadata();

View File

@@ -26,6 +26,7 @@ interface CallOfferAnswer {
export interface CallCapabilities { export interface CallCapabilities {
'm.call.transferee': boolean; 'm.call.transferee': boolean;
'm.call.dtmf': boolean;
} }
export interface MCallAnswer { export interface MCallAnswer {