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

Handle DTMF support

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner
2021-07-27 17:51:13 +02:00
parent a69d9a9f20
commit 959e3f68a4
2 changed files with 13 additions and 10 deletions

View File

@@ -394,6 +394,10 @@ export class MatrixCall extends EventEmitter {
return Boolean(this.opponentCaps && this.opponentCaps["m.call.transferee"]);
}
public opponentSupportsDTMF(): boolean {
return Boolean(this.opponentCaps && this.opponentCaps["m.call.dtmf"]);
}
public getRemoteAssertedIdentity(): AssertedIdentity {
return this.remoteAssertedIdentity;
}
@@ -1032,11 +1036,10 @@ export class MatrixCall extends EventEmitter {
[SDPStreamMetadataKey]: this.getLocalSDPStreamMetadata(),
} as MCallAnswer;
if (this.client.supportsCallTransfer) {
answerContent.capabilities = {
'm.call.transferee': true,
};
}
answerContent.capabilities = {
'm.call.transferee': true,
'm.call.dtmf': false,
};
// 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
@@ -1374,11 +1377,10 @@ export class MatrixCall extends EventEmitter {
content.description = this.peerConn.localDescription;
}
if (this.client.supportsCallTransfer) {
content.capabilities = {
'm.call.transferee': true,
};
}
content.capabilities = {
'm.call.transferee': true,
'm.call.dtmf': false,
};
content[SDPStreamMetadataKey] = this.getLocalSDPStreamMetadata();