You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-12-02 17:02:31 +03:00
Handle DTMF support
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ interface CallOfferAnswer {
|
||||
|
||||
export interface CallCapabilities {
|
||||
'm.call.transferee': boolean;
|
||||
'm.call.dtmf': boolean;
|
||||
}
|
||||
|
||||
export interface MCallAnswer {
|
||||
|
||||
Reference in New Issue
Block a user