From e3e6bac1ce0f900b26df68063dca11d362856437 Mon Sep 17 00:00:00 2001 From: Takekatsu Hiramura Date: Thu, 13 Jun 2024 18:25:45 +0900 Subject: [PATCH] Add sendInterval to dtmf --- lib/src/rtc_session.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/rtc_session.dart b/lib/src/rtc_session.dart index 57ef8174..2e5e1755 100644 --- a/lib/src/rtc_session.dart +++ b/lib/src/rtc_session.dart @@ -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'); @@ -931,7 +932,7 @@ class RTCSession extends EventManager implements Owner { dtmf.send(tone, options); await Future.delayed( - Duration(milliseconds: duration + interToneGap), () {}); + Duration(milliseconds: sendInterval), () {}); }); } }