cloudflare-docs icon indicating copy to clipboard operation
cloudflare-docs copied to clipboard

Cloudflare SFU API documentation update

Open eadwu opened this issue 9 months ago • 3 comments

Existing documentation URL(s)

https://developers.cloudflare.com/realtime/static/calls-api-2024-05-21.yaml

What changes are you suggesting?

Latest documentation? But here are some specific things missing

/apps/{appId}/sessions/new doesn't seem to introduce sessionDescription anywhere, even though that it is a valid parameter (requestBody).

For /apps/{appId}/sessions/{sessionId}/tracks/new I tried the example

              push_track_without_an_offer:
                description: SFU can generate an offer to push a local track
                value:
                  tracks:
                    - location: local
                      trackName: mic-1
                      kind: "audio"

but it doesn't work. For some reason, using bidirectionalMediaStream: true makes it work, but that generates a sendrecv transceiver while bidirectionalMediaStream: false (or unset) fails with backend error - I believe the example is implying a one way transceiver.

Additional information

I don't also see any information with regard to Trickle ICE so I'm guessing it is not supported.

eadwu avatar Feb 20 '26 18:02 eadwu

Hi, @eadwu The points to address:

The /apps/{appId}/sessions/new endpoint doesn’t currently document the sessionDescription parameter, even though it’s valid in the requestBody. The docs should include it.

For /apps/{appId}/sessions/{sessionId}/tracks/new, the example with push_track_without_an_offer fails unless bidirectionalMediaStream: true is set. This seems inconsistent with the example, which implies a one-way transceiver. The docs should clarify the behavior and update the example so that it works as expected with one-way tracks.

This will help ensure the Realtime API examples are accurate and match actual behavior.

dataCenter430 avatar Feb 20 '26 19:02 dataCenter430

Actually I think SFU-initiated local tracks might just be broken, connected bidirectionalMediaStream and added track and WebRTC stats show that data is being emitted.

Trying to play that same remote track results in an a=inactive m= offer, remote_tracks example call. If I switch from SFU-initiated local track to exposing my tracks via SDP, local_tracks example, then I can play the remote track fine.

eadwu avatar Feb 22 '26 04:02 eadwu

Hey there, we've marked this issue as stale because there's no recent activity on it. This label helps us identify long-standing issues in our repo (and not used to auto-close issues).

github-actions[bot] avatar Mar 09 '26 03:03 github-actions[bot]