8000 Keep the sendDtmf method for compatibility with older versions. · tmthecoder/flutter-webrtc@da23d17 · GitHub
[go: up one dir, main page]

Skip to content

Commit da23d17

Browse files
committed
Keep the sendDtmf method for compatibility with older versions.
1 parent 59fc801 commit da23d17

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

lib/src/rtc_dtmf_sender.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
2727
'gap': interToneGap,
2828
});
2929
}
30+
31+
/// Compatible with old methods
32+
Future<void> sendDtmf(String tones,
33+
{int duration = 100, int interToneGap = 70}) =>
34+
insertDTMF(tones, duration: duration, interToneGap: interToneGap);
3035
}

lib/src/web/rtc_dtmf_sender.dart

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,13 @@ class RTCDTMFSender {
1414
/// The browser will enforce a minimum value of 30 ms (that is,
1515
/// if you specify a lower value, 30 ms will be used instead);
1616
/// the default is 70 ms.
17-
Future<void> insertDtmf(String tones,
17+
Future<void> insertDTMF(String tones,
1818
{int duration = 100, int interToneGap = 70}) async {
1919
return _jsDtmfSender.insertDtmf(tones, duration, interToneGap);
2020
}
21+
22+
/// Compatible with old methods
23+
Future<void> sendDtmf(String tones,
24+
{int duration = 100, int interToneGap = 70}) =>
25+
insertDTMF(tones, duration: duration, interToneGap: interToneGap);
2126
}

0 commit comments

Comments
 (0)
0