Skip to content

Twilio Video: Notable first frame delay (7–8 seconds lag) during video call connection establishment and room join, causing a brief black screen before media rendering. #2217

@bls-anand-kumar

Description

@bls-anand-kumar

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:

  1. ~7–8 seconds delay before the participant’s video becomes visible
  2. Initial black screen for ~2–3 seconds after both participants are connected
  3. After the video starts, call quality is stable with no further lag

Call Flow (Steps to Reproduce)

  1. Client initiates a Twilio Video call from the frontend application
  2. Backend creates a Twilio room and returns the room ID + token
  3. Client enters a lobby state (not yet connected to the room)
  4. Call is sent to participants via PubNub (real-time messaging)
  5. Client receives token and connects to the Twilio room, waiting for participant
  6. Participant receives incoming call notification
  7. Participant accepts the call
  8. Participant gets token from backend and joins the same room
  9. 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

  1. Black screen appears for a few seconds
  2. Total delay ~7–8 seconds before video renders

Technical Setup

  1. Frontend (React App)
  • twilio-video: v2.32.1
  • @twilio/voice-sdk: v2.15.0
  • @twilio/video-processor: v3.1.0
  1. 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

  1. Issue is reproducible across:
  • Main application
  • Simplified POC
  1. Backend APIs are not contributing to delay
  2. Delay seems to occur during:
  • WebRTC connection setup
  • Media track subscription/rendering

Questions

  1. Is this expected behavior in Twilio Video / WebRTC?
  2. Has anyone experienced similar initial video delay / black screen issue?
  3. Are there any recommended optimizations to reduce:
  • Time to first video frame
  • Track subscription delay
  1. Could this be related to:
  • Room type (Group vs P2P)?
  • Network conditions (TURN vs direct connection)?
  • Codec negotiation or initial bitrate setup?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions