Problem Statement
We are receiving user complaints about a delay in video appearance when joining a Twilio Video call.
During our testing, we consistently observed:
- ~7–8 seconds delay before the participant’s video becomes visible
- Initial black screen for ~2–3 seconds after both participants are connected
- After the video starts, call quality is stable with no further lag
Call Flow (Steps to Reproduce)
- Client initiates a Twilio Video call from the frontend application
- Backend creates a Twilio room and returns the room ID + token
- Client enters a lobby state (not yet connected to the room)
- Call is sent to participants via PubNub (real-time messaging)
- Client receives token and connects to the Twilio room, waiting for participant
- Participant receives incoming call notification
- Participant accepts the call
- Participant gets token from backend and joins the same room
- Both client and participant are connected → media streaming via WebRTC starts
Observed Issue
The delay occurs specifically between:
Participant accepts the call → Video track becomes visible
- Black screen appears for a few seconds
- Total delay ~7–8 seconds before video renders
Technical Setup
- Frontend (React App)
- twilio-video: v2.32.1
- @twilio/voice-sdk: v2.15.0
- @twilio/video-processor: v3.1.0
- Backend (ASP.NET Core)
- Twilio NuGet package: v7.2.2
What We Have Tried
1. Backend API Analysis
- Captured all API calls involved in the flow
- Each API response time ≤ 1.5 seconds
- No backend bottleneck identified
2. SDK Upgrades
- Upgraded frontend Twilio SDKs to latest versions
- Upgraded backend Twilio NuGet package
- No improvement observed
3. POC Testing
- Created a lightweight Twilio Video setup (frontend-only, no backend dependency)
- Observed similar delay (~4 seconds) even in Twilio sample application
4. Library Optimization
- Disabled and removed @twilio/video-processor (used for video effects)
- No improvement in performance
Key Observations
- Issue is reproducible across:
- Main application
- Simplified POC
- Backend APIs are not contributing to delay
- Delay seems to occur during:
- WebRTC connection setup
- Media track subscription/rendering
Questions
- Is this expected behavior in Twilio Video / WebRTC?
- Has anyone experienced similar initial video delay / black screen issue?
- Are there any recommended optimizations to reduce:
- Time to first video frame
- Track subscription delay
- Could this be related to:
- Room type (Group vs P2P)?
- Network conditions (TURN vs direct connection)?
- Codec negotiation or initial bitrate setup?
Problem Statement
We are receiving user complaints about a delay in video appearance when joining a Twilio Video call.
During our testing, we consistently observed:
Call Flow (Steps to Reproduce)
Observed Issue
The delay occurs specifically between:
Participant accepts the call → Video track becomes visible
Technical Setup
What We Have Tried
1. Backend API Analysis
2. SDK Upgrades
3. POC Testing
4. Library Optimization
Key Observations
Questions