I'm using mediasoup in an Express project to build a video conferencing application. However, I'm facing an intermittent issue where a peer joins the room but cannot see/hear others (video/audio streams from other peers are not displayed). The issue is resolved when the peer refreshes the page.
Here are the details of my problem:
Problem Description:
When a peer joins the room, they do not receive video/audio streams from other peers. The names of other peers are visible, but the streams are missing (displayed as "black squares"). The issue is resolved when the peer refreshes the page.
mediasoup Logs
2025-02-03T08:54:13.764Z mediasoup:WARN:Channel [pid:1436684] RTC::Producer::ReceiveRtpPacket() | no stream found for received packet [ssrc:603892996] 2025-02-03T08:58:58.305Z mediasoup:WARN:Channel [pid:1436684] RTC::Transport::ReceiveRtpPacket() | no suitable Producer for received RTP packet [ssrc:731891105, payloadType:97] 2025-02-03T08:58:58.737Z mediasoup:WARN:Channel [pid:1436684] RTC::Producer::ReceiveRtpPacket() | no stream found for received packet [ssrc:731891105] 2025-02-03T08:59:24.627Z mediasoup:WARN:Channel [pid:1436684] RTC::Producer::ReceiveRtpPacket() | no stream found for received packet [ssrc:1189021310] 2025-02-03T08:59:25.430Z mediasoup:WARN:Channel [pid:1436684] RTC::Producer::ReceiveRtpPacket() | no stream found for received packet [ssrc:3901521563] 2025-02-03T08:59:27.005Z mediasoup:WARN:Channel [pid:1436684] RTC::Producer::ReceiveRtpPacket() | no stream found for received packet [ssrc:2881710948] 2025-02-03T08:59:53.510Z mediasoup:WARN:Channel [pid:1436684] RTC::IceServer::OnTimer() | ICE consent expired due to timeout, moving to 'disconnected' state 2025-02-03T08:59:54.540Z mediasoup:WARN:Channel [pid:1436684] RTC::WebRtcTransport::SendSctpData() | DTLS not connected, cannot send SCTP data
Context
- mediasoup version: v3
- Environment: Node.js with Express
- Browser: Chrome (latest version)
- mediasoup configuration: I'm using a standard configuration for WebRTC transports and routers.
Hypotheses
Based on the logs, I suspect the issue might be related to:
- SSRC desynchronization: RTP packets are not correctly associated with streams.
- DTLS/SCTP connection issues: The DTLS or SCTP connection is not established properly.
- Bandwidth instability: Bandwidth fluctuations might be causing interruptions.
- ICE connection issues: The ICE connection is timing out or failing.
- Consumers problems
Question
- Do you have any ideas about what could be causing this issue?
- How can I better diagnose and resolve this problem?
- Are there any best practices for handling SSRC, DTLS/SCTP connections, or bandwidth issues in mediasoup?
Thank you in advance for your help!