Realtime SFU WebSocket adapter is generally available
The WebSocket adapter for Cloudflare's Realtime SFU is now generally available, enabling servers to connect live WebRTC calls and receive uncompressed PCM audio and JPEG video frames for processing without implementing a WebRTC client. The SFU also improves retry logic for WebSocket connections from 5 to 15 seconds and makes the close API idempotent.
The WebSocket adapter for Cloudflare's Realtime SFU is now generally available. The SFU (selective forwarding unit) is managed WebRTC infrastructure for live audio, video, and data across Cloudflare's global network in 330+ cities ↗︎.
The adapter connects live calls to any server that accepts WebSockets, such as a Durable Object. It delivers uncompressed pulse-code modulation (PCM) audio and JPEG video frames. Your backend can process this media without implementing a WebRTC client.
What you can build
- Transcribe or record call audio, or let a voice agent hear and respond to participants. The AI audio example uses Durable Objects and Workers AI for transcription and speech generation. Separate adapters receive PCM audio and send generated speech back to participants.
- Analyze images or build previews from live video. The WebRTC-to-JPEG example ↗︎ sends a browser's camera stream to a Durable Object as JPEG frames at one frame per second by default.
What changes for existing integrations
Existing adapter creation requests and media formats stay the same.
For WebRTC-to-WebSocket streaming, the SFU now automatically retries the same endpoint for up to 15 seconds instead of 5, with no additional API setting.
The close API is now idempotent and returns success even if the adapter has already closed:
{
"tracks": [{ "adapterId": "<ADAPTER_ID>" }]
}
Refer to the WebSocket adapter guide for setup, media formats, and API requests.
Source: original entry ↗
More from Cloudflare
Follow Cloudflare to get its new changes in your feed and email digest.
Cloudflare API MCP server now serves Cloudflare skills
The Cloudflare API MCP server now integrates with the Skills over MCP extension, allowing MCP clients to discover and access Cloudflare skills. Users can add the MCP server endpoint to compatible MCP clients to access these skills.
WAF failed detections field now available in Rules
A new cf.appsec.request.failed_detections field lets you control how rules handle requests when security detections fail. This array of detection IDs covers content scanning, WAF attack scoring, attack signatures, leaked credentials, and AI-based PII/prompt injection/custom topic detection failures, and works across custom rules, rate limiting rules, and request header transform rules.
Markdown for Agents: More efficient in-process streaming conversion
Markdown for Agents now uses an in-process streaming engine at the edge to convert HTML, reducing overhead and memory use. The conversion limit increased from 2 MiB to 6 MiB, and token count headers are no longer generated.