How to Render Remote Tracks in Group Video Call Using SFU with flutter_webrtc and Cloudflare Calls

59 views
Skip to first unread message

Daksh khosla

unread,
May 6, 2025, 9:19:35 AM5/6/25
to discuss-webrtc

I'm building a Flutter group video call app using the flutter_webrtc package. I previously built a P2P version where I handled SDP manually using Durable Objects, and it worked fine.

Now I’m using Cloudflare Calls (SFU) to scale the app for group calling.

✅ What Works So Far:

  • The session creator publishes their local stream and joins the session.

  • Other users can join the same session using Cloudflare’s API.

  • I'm receiving remote tracks via the onTrack callback (confirmed via logging).

  • I'm using RTCVideoRenderer to render remote streams.


❌ The Problem:

Even though the MediaStreamTrack arrives via onTrack, I cannot get the remote video to render in the UI. The RTCVideoRenderer stays blank — no errors, just nothing visible.
❓ Question:

What is the correct way to render remote tracks using flutter_webrtc in a group call with SFU (Cloudflare Calls)?

Are there any extra steps needed when dealing with multiple incoming tracks in SFU mode? Do I need to manually add tracks to the peer connection in a different way?

Any help from those who’ve used Cloudflare Calls or SFU with Flutter would be hugely appreciated!

Nils Ohlmeier

unread,
May 7, 2025, 12:52:39 AM5/7/25
to discuss-webrtc
Hello,

I have never used Flutter, but I have two hints for using Cloudflare SFU:

- From your wording it sounds like the other user is using the same session as the publisher. That is not how the API is intended. Each user should create it's own session.
- Before pulling the published track from the receiver side you try to ensure that the publisher has successfully established its connection with the SFU and is sending media.

I would also recommend to use the Cloudflare community forum or their Discord rather than this mailing list for questions regarding Cloudflare's SFU.

Best
  Nils Ohlmeier
Reply all
Reply to author
Forward
0 new messages