Skip to content

Commit

Permalink
Merge pull request #1665 from bc-lee/feature/dtmf-workaround
Browse files Browse the repository at this point in the history
fix: Add workaround for Firefox DTMF compatibility
  • Loading branch information
fippo authored Jun 25, 2024
2 parents 9db4d1d + 39f7a63 commit 2b86c32
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/content/peerconnection/dtmf/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ function dtmfOnToneChange(tone) {
}

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

main();
main();

0 comments on commit 2b86c32

Please sign in to comment.