Skip to content

Commit

Permalink
Add sendInterval to dtmf (#443)
Browse files Browse the repository at this point in the history
Co-authored-by: Takekatsu Hiramura <[email protected]>
  • Loading branch information
hiratake55 and takekatsuhiramura authored Jul 2, 2024
1 parent 11b02e6 commit 27d491f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/src/rtc_session.dart
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@ class RTCSession extends EventManager implements Owner {
int duration = options['duration'] ?? RTCSession_DTMF.C.DEFAULT_DURATION;
int interToneGap =
options['interToneGap'] ?? RTCSession_DTMF.C.DEFAULT_INTER_TONE_GAP;
int sendInterval = options['sendInterval'] ?? duration + interToneGap;

if (tones == null) {
throw Exceptions.TypeError('Not enough arguments');
Expand Down Expand Up @@ -945,7 +946,7 @@ class RTCSession extends EventManager implements Owner {

dtmf.send(tone, options);
await Future<void>.delayed(
Duration(milliseconds: duration + interToneGap), () {});
Duration(milliseconds: sendInterval), () {});
});
}
}
Expand Down

0 comments on commit 27d491f

Please sign in to comment.