webrtc / samples

WebRTC Web demos and samples
https://webrtc.github.io/samples
BSD 3-Clause "New" or "Revised" License
13.94k stars 5.71k forks source link

fix: Add workaround for Firefox DTMF compatibility #1665

Closed bc-lee closed 3 months ago

bc-lee commented 3 months ago

Description

src/content/peerconnection/dtmf/js/main.js was incompatible with Firefox due to its reliance on the canInsertDTMF function, which is not supported in Firefox. This commit implements a workaround by assuming DTMF insertion is always available when canInsertDTMF is not present.

Purpose

fippo commented 3 months ago

looks like you have an upstream fix which is the preferred way? Now we just need @Pehrsons to agree but that should be easy ;-)

bc-lee commented 3 months ago

Yes, I've uploaded my patch to the Mozilla Phabricator to implement canInsertDTMF method. However, I still believe using the workaround for older Firefox versions is worthwhile. Even web platform tests utilizes the workaround, as you can see here.