Skip to content

Commit

Permalink
Add sendInterval to dtmf
Browse files Browse the repository at this point in the history
  • Loading branch information
takekatsuhiramura committed Jun 14, 2024
1 parent c9f7e16 commit e3e6bac
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 @@ -848,6 +848,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 @@ -931,7 +932,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 e3e6bac

Please sign in to comment.