The idle timeout feature automatically ends a call session when a participant is alone for a specified period. This prevents abandoned calls from running indefinitely.Documentation Index
Fetch the complete documentation index at: https://cometchat-22654f5b-v5-calling-sdk-enhancement-react-native.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Configure Idle Timeout
Set the idle timeout period when creating call settings:| Parameter | Type | Default | Description |
|---|---|---|---|
idleTimeoutPeriodBeforePrompt | number | 180000 | Milliseconds of inactivity before the prompt appears |
idleTimeoutPeriodAfterPrompt | number | 120000 | Milliseconds the user has to respond before the session ends |
How It Works
- When all other participants leave the call, the idle timeout timer starts
- A prompt appears 60 seconds before the timeout, allowing the user to extend the session
- If the user doesn’t respond, the session ends automatically
- If another participant joins, the timer is cancelled
Listen for Timeout Events
Session Timeout Event
Listen for when the session times out:Disable Idle Timeout
Set a very high value to effectively disable the timeout:Complete Example
Timeout Behavior
| Scenario | Behavior |
|---|---|
| User is alone | Timer starts counting down |
| Another participant joins | Timer is cancelled |
| User extends session | Timer resets |
| Timer expires | Session ends, onSessionTimedOut fires |
Related Documentation
- Session Settings - Configure call settings
- Events - Handle timeout events
- Join Session - Start a call session