Skip to content

Commit 2b86c32

Browse files
authored
Merge pull request #1665 from bc-lee/feature/dtmf-workaround
fix: Add workaround for Firefox DTMF compatibility
2 parents 9db4d1d + 39f7a63 commit 2b86c32

File tree

1 file changed

+4
-2
lines changed
  • src/content/peerconnection/dtmf/js

1 file changed

+4
-2
lines changed

src/content/peerconnection/dtmf/js/main.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,9 @@ function dtmfOnToneChange(tone) {
173173
}
174174

175175
function sendTones(tones) {
176-
if (dtmfSender && dtmfSender.canInsertDTMF) {
176+
// firefox doesn't implement canInsertDTMF, so assume it's always available
177+
// Ref: https://bugzilla.mozilla.org/show_bug.cgi?id=1623193
178+
if (dtmfSender && (typeof (dtmfSender.canInsertDTMF) === 'undefined' || dtmfSender.canInsertDTMF)) {
177179
const duration = durationInput.value;
178180
const gap = gapInput.value;
179181
console.log('Tones, duration, gap: ', tones, duration, gap);
@@ -193,4 +195,4 @@ function addDialPadHandlers() {
193195
}
194196
}
195197

196-
main();
198+
main();

0 commit comments

Comments
 (0)