From 5ff0cb82d4d555c329575ef8df073f17dbcb6b7d Mon Sep 17 00:00:00 2001 From: lgmarchi Date: Fri, 11 Oct 2024 15:32:42 -0300 Subject: [PATCH] Change time to wait for one answer in a call --- src/lib/media/Voice.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/media/Voice.ts b/src/lib/media/Voice.ts index f21c95104..4fb3ca7b7 100644 --- a/src/lib/media/Voice.ts +++ b/src/lib/media/Voice.ts @@ -12,6 +12,9 @@ import { joinRoom } from "trystero/ipfs" const CALL_ACK = "CALL_ACCEPT" +const TIME_TO_WAIT_FOR_ANSWER = 35000 +const TIME_TO_SHOW_END_CALL_FEEDBACK = 3500 + let timeOuts: NodeJS.Timeout[] = [] export enum VoiceRTCMessageType { @@ -437,10 +440,10 @@ export class VoiceRTC { timeOuts.push( setTimeout(() => { this.leaveCall(true) - }, 3500) + }, TIME_TO_SHOW_END_CALL_FEEDBACK) ) } - }, 20000) + }, TIME_TO_WAIT_FOR_ANSWER) timeOuts.push(timeoutWhenCallIsNull) Store.setActiveCall(Store.getCallingChat(this.channel!)!, CallDirection.Outbound) } catch (error) {