From c838a01b65ae21ec140080f659b9442f8a3756a6 Mon Sep 17 00:00:00 2001 From: Denise Pena Date: Tue, 8 Apr 2025 13:48:48 -0500 Subject: [PATCH 01/11] Renaming Calls to Realtime --- .../static/realtime-api-2024-05-21.yaml | 545 ++++++++++++++++++ .../video-calling-application.png | Bin src/content/apps/index.yaml | 16 +- src/content/docs/calls/index.mdx | 34 -- src/content/docs/calls/introduction.mdx | 45 -- src/content/docs/calls/pricing.mdx | 22 - src/content/docs/calls/sessions-tracks.mdx | 45 -- src/content/docs/realtime/calls-vs-sfus.mdx | 47 ++ .../docs/{calls => realtime}/changelog.mdx | 2 +- .../docs/{calls => realtime}/datachannels.mdx | 10 +- .../docs/{calls => realtime}/demos.mdx | 6 +- .../example-architecture.mdx | 6 +- .../docs/{calls => realtime}/get-started.mdx | 6 +- .../docs/{calls => realtime}/https-api.mdx | 10 +- src/content/docs/realtime/index.mdx | 34 ++ src/content/docs/realtime/introduction.mdx | 45 ++ .../docs/{calls => realtime}/limits.mdx | 4 +- src/content/docs/realtime/pricing.mdx | 22 + src/content/docs/realtime/sessions-tracks.mdx | 45 ++ .../{calls => realtime}/turn/analytics.mdx | 6 +- .../turn/custom-domains.mdx | 4 +- .../docs/{calls => realtime}/turn/faq.mdx | 64 +- .../turn/generate-credentials.mdx | 0 .../docs/{calls => realtime}/turn/index.mdx | 12 +- .../turn/replacing-existing.mdx | 14 +- .../{calls => realtime}/turn/rfc-matrix.mdx | 2 +- .../{calls => realtime}/turn/what-is-turn.mdx | 2 +- .../account-permissions-table.mdx | 4 +- .../products/{calls.yaml => realtime.yaml} | 10 +- src/content/products/turn.yaml | 6 +- src/content/release-notes/calls.yaml | 16 +- src/icons/{calls.svg => realtime.svg} | 0 32 files changed, 838 insertions(+), 246 deletions(-) create mode 100644 public/realtime/static/realtime-api-2024-05-21.yaml rename src/assets/images/{calls => realtime}/video-calling-application.png (100%) delete mode 100644 src/content/docs/calls/index.mdx delete mode 100644 src/content/docs/calls/introduction.mdx delete mode 100644 src/content/docs/calls/pricing.mdx delete mode 100644 src/content/docs/calls/sessions-tracks.mdx create mode 100644 src/content/docs/realtime/calls-vs-sfus.mdx rename src/content/docs/{calls => realtime}/changelog.mdx (66%) rename src/content/docs/{calls => realtime}/datachannels.mdx (56%) rename src/content/docs/{calls => realtime}/demos.mdx (55%) rename src/content/docs/{calls => realtime}/example-architecture.mdx (59%) rename src/content/docs/{calls => realtime}/get-started.mdx (56%) rename src/content/docs/{calls => realtime}/https-api.mdx (82%) create mode 100644 src/content/docs/realtime/index.mdx create mode 100644 src/content/docs/realtime/introduction.mdx rename src/content/docs/{calls => realtime}/limits.mdx (83%) create mode 100644 src/content/docs/realtime/pricing.mdx create mode 100644 src/content/docs/realtime/sessions-tracks.mdx rename src/content/docs/{calls => realtime}/turn/analytics.mdx (92%) rename src/content/docs/{calls => realtime}/turn/custom-domains.mdx (81%) rename src/content/docs/{calls => realtime}/turn/faq.mdx (53%) rename src/content/docs/{calls => realtime}/turn/generate-credentials.mdx (100%) rename src/content/docs/{calls => realtime}/turn/index.mdx (75%) rename src/content/docs/{calls => realtime}/turn/replacing-existing.mdx (78%) rename src/content/docs/{calls => realtime}/turn/rfc-matrix.mdx (95%) rename src/content/docs/{calls => realtime}/turn/what-is-turn.mdx (97%) rename src/content/products/{calls.yaml => realtime.yaml} (55%) rename src/icons/{calls.svg => realtime.svg} (100%) diff --git a/public/realtime/static/realtime-api-2024-05-21.yaml b/public/realtime/static/realtime-api-2024-05-21.yaml new file mode 100644 index 00000000000000..678bd9f2fc90e2 --- /dev/null +++ b/public/realtime/static/realtime-api-2024-05-21.yaml @@ -0,0 +1,545 @@ +openapi: 3.0.0 +info: + title: Cloudflare Realtime API + version: "1.0" +externalDocs: + description: Find out more about Cloudflare Realtime + url: https://developers.cloudflare.com/realtime/ +servers: + - url: https://rtc.live.cloudflare.com/v1 +paths: + /apps/{appId}/sessions/new: + post: + tags: + - New Session + summary: Create a new PeerConnection + security: + - secret: [] + parameters: + - in: path + name: appId + schema: + type: string + required: true + description: WebRTC application ID + - in: query + name: thirdparty + schema: + type: boolean + description: Session is intended to connect to an ICE-lite peer like a third party SFU/server + - in: query + name: correlationId + schema: + type: string + description: Associate session to an user-provided correlation id + responses: + "201": + description: Created + headers: + vary: + schema: + type: string + example: Origin + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/NewSessionResponse" + - example: + sessionId: e017a2629c754fedc1f7d8587e06d126 + /apps/{appId}/sessions/{sessionId}/tracks/new: + post: + tags: + - Add a track + summary: Solve the given track object(s) and add the track(s) to the WebRTC session + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/TracksRequest" + examples: + local_tracks: + description: Share a track to be played by remote peers + value: + sessionDescription: + sdp: | + v=0 + o=- 0 0 IN IP4 127.0.0.1 + s=- + c=IN IP4 127.0.0.1 + t=0 0 + m=audio 4000 RTP/AVP 111 + a=rtpmap:111 OPUS/48000/2 + m=video 4002 RTP/AVP 96 + a=rtpmap:96 VP8/90000 + ... + type: offer + tracks: + - location: local + mid: "4" + trackName: 1a037563-c35c-4bf6-a9ee-2b474cbb9a51 + remote_tracks: + description: Play a track from a remote peer + value: + tracks: + - location: remote + sessionId: 2a45361d5fd7cc14eface0587c276c94 + trackName: 2e037563-a35d-4bf6-a9ee-2d474cbb9a58 + push_track_with_bidirectional_stream: + description: Share a track through a bidirectional transceiver + value: + sessionDescription: + sdp: | + v=0 + o=- 0 0 IN IP4 127.0.0.1 + s=- + c=IN IP4 127.0.0.1 + t=0 0 + m=audio 4000 RTP/AVP 111 + a=rtpmap:111 OPUS/48000/2 + m=video 4002 RTP/AVP 96 + a=rtpmap:96 VP8/90000 + ... + type: offer + tracks: + - location: local + mid: "0" + trackName: mic-1 + bidirectionalMediaStream: true + kind: "audio" + 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" + push_tracks_with_autodiscover: + description: SFU detects any new track in the offered SDP + value: + autoDiscover: true + sessionDescription: + sdp: | + v=0 + o=- 0 0 IN IP4 127.0.0.1 + s=- + c=IN IP4 127.0.0.1 + t=0 0 + m=audio 4000 RTP/AVP 111 + a=rtpmap:111 OPUS/48000/2 + m=video 4002 RTP/AVP 96 + a=rtpmap:96 VP8/90000 + ... + type: offer + pull_track_with_bidirectional_stream: + description: Pull a track through an existing bidirectional transceiver identified by a mid + value: + tracks: + - location: remote + mid: "#mic-1" + sessionId: 2a45361d5fd7cc14eface0587c276c94 + trackName: generated-audio + kind: "audio" + security: + - secret: [] + parameters: + - in: path + name: appId + schema: + type: string + required: true + description: WebRTC application ID + - in: path + name: sessionId + schema: + type: string + required: true + description: Current PeerConnection session ID + responses: + "200": + description: OK + headers: + vary: + schema: + type: string + example: Origin + content: + application/json: + schema: + $ref: "#/components/schemas/TracksResponse" + examples: + local_tracks: + value: + requiresImmediateRenegotiation: false + tracks: + - trackName: 1a037563-c35c-4bf6-a9ee-2b474cbb9a51 + mid: "4" + sessionDescription: + sdp: | + v=0 + o=- 0 0 IN IP4 127.0.0.1 + s=- + c=IN IP4 127.0.0.1 + t=0 0 + m=audio 4000 RTP/AVP 111 + a=rtpmap:111 OPUS/48000/2 + m=video 4002 RTP/AVP 96 + a=rtpmap:96 VP8/90000 + ... + type: answer + remote_tracks: + value: + requiresImmediateRenegotiation: true + tracks: + - sessionId: 2a45361d5fd7cc14eface0587c276c94 + trackName: 2e037563-a35d-4bf6-a9ee-2d474cbb9a58 + mid: "7" + sessionDescription: + sdp: | + v=0 + o=- 0 0 IN IP4 127.0.0.1 + s=- + c=IN IP4 127.0.0.1 + t=0 0 + m=audio 4000 RTP/AVP 111 + a=rtpmap:111 OPUS/48000/2 + m=video 4002 RTP/AVP 96 + a=rtpmap:96 VP8/90000 + ... + type: offer + /apps/{appId}/sessions/{sessionId}/renegotiate: + put: + tags: + - Renegotiate WebRTC session + summary: When a previous response has requiresImmediateRenegotiation, you must renegotiate + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/RenegotiateRequest" + example: + sessionDescription: + sdp: | + v=0 + o=- 0 0 IN IP4 127.0.0.1 + s=- + c=IN IP4 127.0.0.1 + t=0 0 + m=audio 4000 RTP/AVP 111 + a=rtpmap:111 OPUS/48000/2 + m=video 4002 RTP/AVP 96 + a=rtpmap:96 VP8/90000 + ... + type: answer + security: + - secret: [] + parameters: + - in: path + name: appId + schema: + type: string + required: true + description: WebRTC application ID + - in: path + name: sessionId + schema: + type: string + required: true + responses: + "200": + description: OK + headers: + vary: + schema: + type: string + example: Origin + content: + application/json: + schema: + $ref: "#/components/schemas/RenegotiateResponse" + example: {} + /apps/{appId}/sessions/{sessionId}/tracks/close: + put: + tags: + - Close a track + summary: Close a local or remote track + requestBody: + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/CloseTracksRequest" + - example: + tracks: + - mid: "7" + sessionDescription: + sdp: | + v=0 + o=- 0 0 IN IP4 127.0.0.1 + s=- + c=IN IP4 127.0.0.1 + t=0 0 + m=audio 4000 RTP/AVP 111 + a=rtpmap:111 OPUS/48000/2 + m=video 4002 RTP/AVP 96 + a=rtpmap:96 VP8/90000 + ... + type: offer + force: false + security: + - secret: [] + parameters: + - in: path + name: appId + schema: + type: string + required: true + description: WebRTC application ID + - in: path + name: sessionId + schema: + type: string + required: true + responses: + "200": + description: OK + headers: + vary: + schema: + type: string + example: Origin + content: + application/json: + schema: + $ref: "#/components/schemas/CloseTracksResponse" + example: + sessionDescription: + sdp: | + v=0 + o=- 0 0 IN IP4 127.0.0.1 + s=- + c=IN IP4 127.0.0.1 + t=0 0 + m=audio 4000 RTP/AVP 111 + a=rtpmap:111 OPUS/48000/2 + m=video 4002 RTP/AVP 96 + a=rtpmap:96 VP8/90000 + ... + type: answer + requiresImmediateRenegotiation: false + tracks: + - mid: "7" + /apps/{appId}/sessions/{sessionId}: + get: + tags: + - Get session state + summary: Return the list of tracks associated to the session + security: + - secret: [] + parameters: + - in: path + name: appId + schema: + type: string + required: true + description: WebRTC application ID + - in: path + name: sessionId + schema: + type: string + required: true + responses: + "200": + description: OK + headers: + vary: + schema: + type: string + example: Origin + content: + application/json: + schema: + $ref: "#/components/schemas/GetSessionStateResponse" + example: + tracks: + - location: local + mid: "2" + trackName: 1a037563-c35c-4bf6-a9ee-2b474cbb9a51 + status: active + - location: remote + mid: "7" + sessionId: 2a45361d5fd7cc14eface0587c276c94 + trackName: 2e037563-a35d-4bf6-a9ee-2d474cbb9a58 + status: active + +components: + securitySchemes: + secret: + type: http + scheme: bearer + schemas: + SessionDescription: + type: object + properties: + sdp: + type: string + type: + type: string + enum: + - answer + - offer + TrackObject: + type: object + properties: + location: + type: string + enum: + - local + - remote + description: If you want to share a track, it should be local. If you want to play a track shared by a remote agent, it should be remote + mid: + type: string + description: mid associated to track's transceiver. It also can be prefixed with \# to reference an existing transceiver by its trackName + sessionId: + type: string + description: Session ID of the track owner. It should be set for remote tracks only + trackName: + type: string + description: Given name for the track + bidirectionalMediaStream: + type: boolean + description: Make the associated transceiver bidirectional. This option works only when the SFU generates the offer + kind: + type: string + description: Give a hint to the SFU about the transceiver kind. This is required when the SFU generates the offer + CloseTrackObject: + type: object + properties: + mid: + type: string + description: mid associated to the track's transceiver to close + TracksRequest: + type: object + properties: + sessionDescription: + $ref: "#/components/schemas/SessionDescription" + tracks: + type: array + items: + $ref: "#/components/schemas/TrackObject" + autoDiscover: + type: boolean + description: Assign a random track name to any new track in the offered SDP + TracksResponse: + type: object + properties: + errorCode: + type: string + errorDescription: + type: string + requiresImmediateRenegotiation: + type: boolean + sessionDescription: + $ref: "#/components/schemas/SessionDescription" + tracks: + type: array + items: + allOf: + - $ref: "#/components/schemas/TrackObject" + - properties: + errorCode: + type: string + errorDescription: + type: string + NewSessionRequest: + type: object + properties: + sessionDescription: + $ref: "#/components/schemas/SessionDescription" + NewSessionResponse: + required: + - sessionId + type: object + properties: + errorCode: + type: string + errorDescription: + type: string + sessionDescription: + type: object + properties: + sdp: + type: string + type: + type: string + enum: + - answer + - offer + sessionId: + type: string + CloseTracksRequest: + type: object + properties: + sessionDescription: + $ref: "#/components/schemas/SessionDescription" + tracks: + type: array + items: + $ref: "#/components/schemas/CloseTrackObject" + force: + type: boolean + description: True if you want to stop just the data flow for the tracks, no WebRTC renegotiation + CloseTracksResponse: + type: object + properties: + errorCode: + type: string + errorDescription: + type: string + sessionDescription: + $ref: "#/components/schemas/SessionDescription" + tracks: + type: array + items: + allOf: + - $ref: "#/components/schemas/CloseTrackObject" + - properties: + errorCode: + type: string + errorDescription: + type: string + requiresImmediateRenegotiation: + type: boolean + GetSessionStateResponse: + type: object + properties: + errorCode: + type: string + errorDescription: + type: string + tracks: + type: array + items: + allOf: + - $ref: "#/components/schemas/TrackObject" + - properties: + status: + type: string + enum: + - active + - inactive + - waiting + RenegotiateRequest: + type: object + properties: + sessionDescription: + $ref: "#/components/schemas/SessionDescription" + RenegotiateResponse: + type: object + properties: + errorCode: + type: string + errorDescription: + type: string + sessionDescription: + $ref: "#/components/schemas/SessionDescription" diff --git a/src/assets/images/calls/video-calling-application.png b/src/assets/images/realtime/video-calling-application.png similarity index 100% rename from src/assets/images/calls/video-calling-application.png rename to src/assets/images/realtime/video-calling-application.png diff --git a/src/content/apps/index.yaml b/src/content/apps/index.yaml index a83364c7e157f0..7d871738145f49 100644 --- a/src/content/apps/index.yaml +++ b/src/content/apps/index.yaml @@ -229,33 +229,33 @@ updated: 2023-03-22 - link: https://github.com/cloudflare/orange id: Orange Meets - description: Orange Meets is a demo WebRTC application built using Cloudflare Calls. + description: Orange Meets is a demo WebRTC application built using Cloudflare Realtime. tags: [] - products: [Calls] + products: [Realtime] languages: [TypeScript] cloudflare: true updated: 2024-07-05 - link: https://github.com/cloudflare/calls-examples/tree/main/whip-whep-server id: WHIP-WHEP Server - description: WHIP and WHEP server implemented on top of Calls API. + description: WHIP and WHEP server implemented on top of Realtime API. tags: [] - products: [Calls] + products: [Realtime] languages: [TypeScript] cloudflare: true updated: 2022-06-12 - link: https://github.com/cloudflare/calls-examples/tree/main/echo - id: Calls Echo Demo + id: Realtime Echo Demo description: Demonstrates a local stream alongside a remote echo stream. tags: [] - products: [Calls] + products: [Realtime] languages: [JavaScript] cloudflare: true updated: 2025-05-10 - link: https://github.com/cloudflare/calls-examples/tree/main/echo-datachannels - id: Calls DataChannel Test + id: Realtime DataChannel Test description: This example establishes two datachannels, one publishes data and the other one subscribes, the test measures how fast a message travels to and from the server. tags: [] - products: [Calls] + products: [Realtime] languages: [JavaScript] cloudflare: true updated: 2022-06-04 diff --git a/src/content/docs/calls/index.mdx b/src/content/docs/calls/index.mdx deleted file mode 100644 index 403dfea95794ab..00000000000000 --- a/src/content/docs/calls/index.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: Cloudflare Calls -pcx_content_type: overview -sidebar: - order: 1 -head: - - tag: title - content: Overview ---- - -import { Description, LinkButton } from "~/components"; - - - -Build real-time serverless video, audio and data applications. - - - -Cloudflare Calls is infrastructure for real-time audio/video/data applications. It allows you to build real-time apps without worrying about scaling or regions. It can act as a selective forwarding unit (WebRTC SFU), as a fanout delivery system for broadcasting (WebRTC CDN) or anything in between. - -Cloudflare Calls runs on [Cloudflare's global cloud network](https://www.cloudflare.com/network/) in hundreds of cities worldwide. - - - Get started - - - Calls dashboard - - - Orange Meets demo app - diff --git a/src/content/docs/calls/introduction.mdx b/src/content/docs/calls/introduction.mdx deleted file mode 100644 index 202bcd7eb18fc5..00000000000000 --- a/src/content/docs/calls/introduction.mdx +++ /dev/null @@ -1,45 +0,0 @@ ---- -pcx_content_type: overview -title: Introduction -sidebar: - order: 2 - ---- - -Cloudflare Calls can be used to add realtime audio, video and data into your applications. Cloudflare Calls uses WebRTC, which is the lowest latency way to communicate across a broad range of platforms like browsers, mobile, and native apps. - -Calls integrates with your backend and frontend application to add realtime functionality. - -## Why Cloudflare Calls exists - -* **It is difficult to scale WebRTC**: Many struggle scaling WebRTC servers. Operators run into issues about how many users can be in the same "room" or want to build unique solutions that do not fit into the current concepts in high level APIs. - -* **High egress costs**: WebRTC is expensive to use as managed solutions charge a high premium on cloud egress and running your own servers incur system administration and scaling overhead. Cloudflare already has 300+ locations with upwards of 1,000 servers in some locations. Cloudflare Calls scales easily on top of this architecture and can offer the lowest WebRTC usage costs. - -* **WebRTC is growing**: Developers are realizing that WebRTC is not just for video conferencing. WebRTC is supported on many platforms, it is mature and well understood. - -## What makes Cloudflare Calls unique - -* **Unopinionated**: Cloudflare Calls does not offer a SDK. It instead allows you to access raw WebRTC to solve unique problems that might not fit into existing concepts. The API is deliberately simple. - -* **No rooms**: Unlike other WebRTC products, Cloudflare Calls lets you be in charge of each track (audio/video/data) instead of offering abstractions such as rooms. You define the presence protocol on top of simple pub/sub. Each end user can publish and subscribe to audio/video/data tracks as they wish. - -* **No lock-in**: You can use Cloudflare Calls to solve scalability issues with your SFU. You can use in combination with peer-to-peer architecture. You can use Cloudflare Calls standalone. To what extent you use Cloudflare Calls is up to you. - -## What exactly does Cloudflare Calls do? - -* **SFU**: Calls is a special kind of pub/sub server that is good at forwarding media data to clients that subscribe to certain data. Each client connects to Cloudflare Calls via WebRTC and either sends data, receives data or both using WebRTC. This can be audio/video tracks or DataChannels. - -* **It scales**: All Cloudflare servers act as a single server so millions of WebRTC clients can connect to Cloudflare Calls. Each can send data, receive data or both with other clients. - -## How most developers get started - -1. Get started with the echo example, which you can download from the Cloudflare dashboard when you create a Calls App or from [demos](/calls/demos/). This will show you how to send and receive audio and video. - -2. Understand how you can manipulate who can receive what media by passing around session and track ids. Remember, you control who receives what media. Each media track is represented by a unique ID. It is your responsibility to save and distribute this ID. - -:::note[Calls is not a presence protocol] -Calls does not know what a room is. It only knows media tracks. It is up to you to make a room by saving who is in a room along with track IDs that unique identify media tracks. If each participant publishes their audio/video, and receives audio/video from each other, you have got yourself a video conference! -::: - -3. Create an app where you manage each connection to Cloudflare Calls and the track IDs created by each connection. You can use any tool to save and share tracks. Check out the example apps at [demos](/calls/demos/), such as [Orange Meets](https://github.com/cloudflare/orange), which is a full-fledged video conferencing app that uses [Workers Durable Objects](/durable-objects/) to keep track of track IDs. diff --git a/src/content/docs/calls/pricing.mdx b/src/content/docs/calls/pricing.mdx deleted file mode 100644 index dc17e69b74f972..00000000000000 --- a/src/content/docs/calls/pricing.mdx +++ /dev/null @@ -1,22 +0,0 @@ ---- -pcx_content_type: concept -title: Pricing -sidebar: - order: 15 ---- - -Cloudflare Calls billing is based on data sent from Cloudflare edge to your application. - -Cloudflare Calls SFU and TURN services cost $0.05 per GB of data egress. - -There is a free tier of 1,000 GB before any charges start. This free tier includes usage from both SFU and TURN services, not two independent free tiers. Cloudflare Calls billing appears as a single line item on your Cloudflare bill, covering both SFU and TURN. - -Traffic between Cloudflare Calls TURN and Cloudflare Calls SFU or Cloudflare Stream (WHIP/WHEP) does not get double charged, so if you are using both SFU and TURN at the same time, you will get charged for only one. - -### TURN - -Please see the [TURN FAQ page](/calls/turn/faq), where there is additional information on speficially which traffic path from RFC8656 is measured and counts towards billing. - -### SFU - -Only traffic originating from Cloudflare towards clients incurs charges. Traffic pushed to Cloudflare incurs no charge even if there is no client pulling same traffic from Cloudflare. diff --git a/src/content/docs/calls/sessions-tracks.mdx b/src/content/docs/calls/sessions-tracks.mdx deleted file mode 100644 index 28006381760fb6..00000000000000 --- a/src/content/docs/calls/sessions-tracks.mdx +++ /dev/null @@ -1,45 +0,0 @@ ---- -pcx_content_type: get-started -title: Sessions and Tracks -sidebar: - order: 3 - ---- - -Cloudflare Calls offers a simple yet powerful framework for building real-time experiences. At the core of this system are three key concepts: **Applications**, **Sessions** and **Tracks**. Familiarizing yourself with these concepts is crucial for using Calls. - -## Application - -A Calls Application is an environment within different Sessions and Tracks can interact. Examples of this could be production, staging or different environments where you'd want separation between Sessions and Tracks. Cloudflare Calls usage can be queried at Application, Session or Track level. - -## Sessions - -A **Session** in Cloudflare Calls correlates directly to a WebRTC PeerConnection. It represents the establishment of a communication channel between a client and the nearest Cloudflare data center, as determined by Cloudflare's anycast routing. Typically, a client will maintain a single Session, encompassing all communications between the client and Cloudflare. - -* **One-to-One Mapping with PeerConnection**: Each Session is a direct representation of a WebRTC PeerConnection, facilitating real-time media data transfer. -* **Anycast Routing**: The client connects to the closest Cloudflare data center, optimizing latency and performance. -* **Unified Communication Channel**: A single Session can handle all types of communication between a client and Cloudflare, ensuring streamlined data flow. - -## Tracks - -Within a Session, there can be one or more **Tracks**. - -* **Tracks map to MediaStreamTrack**: Tracks align with the MediaStreamTrack concept, facilitating audio, video, or data transmission. -* **Globally Unique Ids**: When you push a track to Cloudflare, it is assigned a unique ID, which can then be used to pull the track into another session elsewhere. -* **Available globally**: The ability to push and pull tracks is central to what makes Calls a versatile tool for real-time applications. Each track is available globally to be retrieved from any Session within an App. - -## Calls as a Programmable "Switchboard" - -The analogy of a switchboard is apt for understanding Calls. Historically, switchboard operators connected calls by manually plugging in jacks. Similarly, Calls allows for the dynamic routing of media streams, acting as a programmable switchboard for modern real-time communication. - -## Beyond "Rooms", "Users", and "Participants" - -While many SFUs utilize concepts like "rooms" to manage media streams among users, this approach has scalability and flexibility limitations. Cloudflare Calls opts for a more granular and flexible model with Sessions and Tracks, enabling a wide range of use cases: - -* Large-scale remote events, like 'fireside chats' with thousands of participants. -* Interactive conversations with the ability to bring audience members "on stage." -* Educational applications where an instructor can present to multiple virtual classrooms simultaneously. - -### Presence Protocol vs. Media Flow - -Calls distinguishes between the presence protocol and media flow, allowing for scalability and flexibility in real-time applications. This separation enables developers to craft tailored experiences, from intimate calls to massive, low-latency broadcasts. diff --git a/src/content/docs/realtime/calls-vs-sfus.mdx b/src/content/docs/realtime/calls-vs-sfus.mdx new file mode 100644 index 00000000000000..7023bdf1919c65 --- /dev/null +++ b/src/content/docs/realtime/calls-vs-sfus.mdx @@ -0,0 +1,47 @@ +--- +pcx_content_type: get-started +title: Realtime vs regular SFUs +sidebar: + order: 4 + +--- + +## Cloudflare Realtime vs. Traditional SFUs + +Cloudflare Realtime represents a paradigm shift in building real-time applications by leveraging a distributed real-time data plane. It creates a seamless experience in real-time communication, transcending traditional geographical limitations and scalability concerns. Realtime is designed for developers looking to integrate WebRTC functionalities in a server-client architecture without delving deep into the complexities of regional scaling or server management. + +### The Limitations of Centralized SFUs + +Selective Forwarding Units (SFUs) play a critical role in managing WebRTC connections by selectively forwarding media streams to participants in a video call. However, their centralized nature introduces inherent limitations: + +* **Regional Dependency:** A centralized SFU requires a specific region for deployment, leading to latency issues for global users except for those in proximity to the selected region. + +* **Scalability Concerns:** Scaling a centralized SFU to meet global demand can be challenging and inefficient, often requiring additional infrastructure and complexity. + +### How is Cloudflare Realtime different? + +Cloudflare Realtime addresses these limitations by leveraging Cloudflare's global network infrastructure: + +* **Global Distribution Without Regions:** Unlike traditional SFUs, Cloudflare Realtime operates on a global scale without regional constraints. It utilizes Cloudflare's extensive network of over 250 locations worldwide to ensure low-latency video forwarding, making it fast and efficient for users globally. + +* **Decentralized Architecture:** There are no dedicated servers for Realtime. Every server within Cloudflare's network contributes to handling Realtime, ensuring scalability and reliability. This approach mirrors the distributed nature of Cloudflare's products such as 1.1.1.1 DNS or Cloudflare's CDN. + +## How Cloudflare Realtime Works + +### Establishing Peer Connections + +To initiate a real-time communication session, an end user's client establishes a WebRTC PeerConnection to the nearest Cloudflare location. This connection benefits from anycast routing, optimizing for the lowest possible latency. + +### Signaling and Media Stream Management + +* **HTTPS API for Signaling:** Cloudflare Realtime simplifies signaling with a straightforward HTTPS API. This API manages the initiation and coordination of media streams, enabling clients to push new MediaStreamTracks or request these tracks from the server. + +* **Efficient Media Handling:** Unlike traditional approaches that require multiple connections for different media streams from different clients, Cloudflare Realtime maintains a single PeerConnection per client. This streamlined process reduces complexity and improves performance by handling both the push and pull of media through a singular connection. + +### Application-Level Management + +Cloudflare Realtime delegates the responsibility of state management and participant tracking to the application layer. Developers are empowered to design their logic for handling events such as participant joins or media stream updates, offering flexibility to create tailored experiences in applications. + +## Getting Started with Cloudflare Realtime + +Integrating Cloudflare Realtime into your application promises a straightforward and efficient process, removing the hurdles of regional scalability and server management so you can focus on creating engaging real-time experiences for users worldwide. \ No newline at end of file diff --git a/src/content/docs/calls/changelog.mdx b/src/content/docs/realtime/changelog.mdx similarity index 66% rename from src/content/docs/calls/changelog.mdx rename to src/content/docs/realtime/changelog.mdx index ebd5b2336037ff..3afde9d8e4c3b4 100644 --- a/src/content/docs/calls/changelog.mdx +++ b/src/content/docs/realtime/changelog.mdx @@ -7,6 +7,6 @@ release_notes_file_name: import { ProductReleaseNotes } from "~/components"; -{/* */} +{/* */} \ No newline at end of file diff --git a/src/content/docs/calls/datachannels.mdx b/src/content/docs/realtime/datachannels.mdx similarity index 56% rename from src/content/docs/calls/datachannels.mdx rename to src/content/docs/realtime/datachannels.mdx index 113d4e0b266c41..4d7e8e3301f2d6 100644 --- a/src/content/docs/calls/datachannels.mdx +++ b/src/content/docs/realtime/datachannels.mdx @@ -11,25 +11,25 @@ While it is possible to send audio and video over DataChannels, it's not optimal ```mermaid graph LR - A[Publisher] -->|Arbitrary data| B[Cloudflare Calls SFU] + A[Publisher] -->|Arbitrary data| B[Cloudflare Realtime SFU] B -->|Arbitrary data| C@{ shape: procs, label: "Subscribers"} ``` -DataChannels on Cloudflare Calls can scale up to many subscribers per publisher, there is no limit to the number of subscribers per publisher. +DataChannels on Cloudflare Realtime can scale up to many subscribers per publisher, there is no limit to the number of subscribers per publisher. ### How to use DataChannels -1. Create a two Calls sessions, one for the publisher and one for the subscribers. +1. Create two Realtime sessions, one for the publisher and one for the subscribers. 2. Create a DataChannel by calling /datachannels/new with the location set to "local" and the dataChannelName set to the name of the DataChannel. 3. Create a DataChannel by calling /datachannels/new with the location set to "remote" and the sessionId set to the sessionId of the publisher. 4. Use the DataChannel to send data from the publisher to the subscribers. ### Unidirectional DataChannels -Cloudflare Calls SFU DataChannels are one way only. This means that you can only send data from the publisher to the subscribers. Subscribers cannot send data back to the publisher. While regular MediaStream WebRTC DataChannels are bidirectional, this introduces a problem for Cloudflare Calls because the SFU does not know which session to send the data back to. This is especially problematic for scenarios where you have multiple subscribers and you want to send data from the publisher to all subscribers at scale, such as distributing game score updates to all players in a multiplayer game. +Cloudflare Realtime SFU DataChannels are one way only. This means that you can only send data from the publisher to the subscribers. Subscribers cannot send data back to the publisher. While regular MediaStream WebRTC DataChannels are bidirectional, this introduces a problem for Cloudflare Realtime because the SFU does not know which session to send the data back to. This is especially problematic for scenarios where you have multiple subscribers and you want to send data from the publisher to all subscribers at scale, such as distributing game score updates to all players in a multiplayer game. To send data in a bidirectional way, you can use two DataChannels, one for sending data from the publisher to the subscribers and one for sending data the opposite direction. ## Example -An example of DataChannels in action can be found in the [Calls Examples github repo](https://github.com/cloudflare/calls-examples/tree/main/echo-datachannels). +An example of DataChannels in action can be found in the [Realtime Examples github repo](https://github.com/cloudflare/calls-examples/tree/main/echo-datachannels). diff --git a/src/content/docs/calls/demos.mdx b/src/content/docs/realtime/demos.mdx similarity index 55% rename from src/content/docs/calls/demos.mdx rename to src/content/docs/realtime/demos.mdx index f80111dc57ac11..01c58a441293e6 100644 --- a/src/content/docs/calls/demos.mdx +++ b/src/content/docs/realtime/demos.mdx @@ -8,10 +8,10 @@ sidebar: import { ExternalResources, GlossaryTooltip } from "~/components" -Learn how you can use Calls within your existing architecture. +Learn how you can use Realtime within your existing architecture. ## Demos -Explore the following demo applications for Calls. +Explore the following demo applications for Realtime. - + diff --git a/src/content/docs/calls/example-architecture.mdx b/src/content/docs/realtime/example-architecture.mdx similarity index 59% rename from src/content/docs/calls/example-architecture.mdx rename to src/content/docs/realtime/example-architecture.mdx index 81790d98985922..68d40ab8084488 100644 --- a/src/content/docs/calls/example-architecture.mdx +++ b/src/content/docs/realtime/example-architecture.mdx @@ -8,13 +8,13 @@ sidebar:
-![Example Architecture](~/assets/images/calls/video-calling-application.png) +![Example Architecture](~/assets/images/realtime/video-calling-application.png)
1. Clients connect to the backend service 2. Backend service manages the relationship between the clients and the tracks they should subscribe to -3. Backend service contacts the Cloudflare Calls API to pass the SDP from the clients to establish the WebRTC connection. -4. Calls API relays back the Calls API SDP reply and renegotiation messages. +3. Backend service contacts the Cloudflare Realtime API to pass the SDP from the clients to establish the WebRTC connection. +4. Realtime API relays back the Realtime API SDP reply and renegotiation messages. 5. If desired, headless clients can be used to record the content from other clients or publish content. 6. Admin manages the rooms and room members. diff --git a/src/content/docs/calls/get-started.mdx b/src/content/docs/realtime/get-started.mdx similarity index 56% rename from src/content/docs/calls/get-started.mdx rename to src/content/docs/realtime/get-started.mdx index 7bdf51b95925e9..09f80b265e3f36 100644 --- a/src/content/docs/calls/get-started.mdx +++ b/src/content/docs/realtime/get-started.mdx @@ -16,10 +16,10 @@ You must first [create a Cloudflare account](/fundamentals/setup/account/create- ## Create your first app -Every Calls App is a separate environment, so you can make one for development, staging and production versions for your product. -Either using [Dashboard](https://dash.cloudflare.com/?to=/:account/calls), or the [API](/api/resources/calls/subresources/sfu/methods/create/) create a Calls App. When you create a Calls App, you will get: +Every Realtime App is a separate environment, so you can make one for development, staging and production versions for your product. +Either using [Dashboard](https://dash.cloudflare.com/?to=/:account/calls), or the [API](/api/resources/calls/subresources/sfu/methods/create/) create a Realtime App. When you create a Realtime App, you will get: * App ID * App Secret -These two combined will allow you to make API Calls from your backend server to Calls. +These two combined will allow you to make API Realtime from your backend server to Realtime. diff --git a/src/content/docs/calls/https-api.mdx b/src/content/docs/realtime/https-api.mdx similarity index 82% rename from src/content/docs/calls/https-api.mdx rename to src/content/docs/realtime/https-api.mdx index 46af7056dce061..ad8f5981be5d09 100644 --- a/src/content/docs/calls/https-api.mdx +++ b/src/content/docs/realtime/https-api.mdx @@ -5,11 +5,11 @@ sidebar: order: 5 --- -Cloudflare Calls simplifies the management of peer connections and media tracks through HTTPS API endpoints. These endpoints allow developers to efficiently manage sessions, add or remove tracks, and gather session information. +Cloudflare Realtime simplifies the management of peer connections and media tracks through HTTPS API endpoints. These endpoints allow developers to efficiently manage sessions, add or remove tracks, and gather session information. ## API Endpoints -- **Create a New Session**: Initiates a new session on Cloudflare Calls, which can be modified with other endpoints below. +- **Create a New Session**: Initiates a new session on Cloudflare Realtime, which can be modified with other endpoints below. - `POST /apps/{appId}/sessions/new` - **Add a New Track**: Adds a media track (audio or video) to an existing session. - `POST /apps/{appId}/sessions/{sessionId}/tracks/new` @@ -28,11 +28,11 @@ It is vital to manage App ID and its secret securely. While track and session ID ## Using STUN and TURN Servers -Cloudflare Calls is designed to operate efficiently without the need for TURN servers in most scenarios, as Cloudflare exposes a publicly routable IP address for Calls. However, integrating a STUN server can be necessary for facilitating peer discovery and connectivity. +Cloudflare Realtime is designed to operate efficiently without the need for TURN servers in most scenarios, as Cloudflare exposes a publicly routable IP address for Realtime. However, integrating a STUN server can be necessary for facilitating peer discovery and connectivity. - **Cloudflare STUN Server**: `stun.cloudflare.com:3478` -Utilizing Cloudflare's STUN server can help the connection process for Calls applications. +Utilizing Cloudflare's STUN server can help the connection process for Realtime applications. ## Lifecycle of a Simple Session @@ -42,7 +42,7 @@ This section provides an overview of the typical lifecycle of a simple session, sequenceDiagram participant WA as WebRTC Agent participant BS as Backend Server - participant CA as Calls API + participant CA as Realtime API Note over BS: Client Joins diff --git a/src/content/docs/realtime/index.mdx b/src/content/docs/realtime/index.mdx new file mode 100644 index 00000000000000..26c9277c486355 --- /dev/null +++ b/src/content/docs/realtime/index.mdx @@ -0,0 +1,34 @@ +--- +title: Cloudflare Realtime +pcx_content_type: overview +sidebar: + order: 1 +head: + - tag: title + content: Overview +--- + +import { Description, LinkButton } from "~/components"; + + + +Build real-time serverless video, audio and data applications. + + + +Cloudflare Realtime is infrastructure for real-time audio/video/data applications. It allows you to build real-time apps without worrying about scaling or regions. It can act as a selective forwarding unit (WebRTC SFU), as a fanout delivery system for broadcasting (WebRTC CDN) or anything in between. + +Cloudflare Realtime runs on [Cloudflare's global cloud network](https://www.cloudflare.com/network/) in hundreds of cities worldwide. + + + Get started + + + Realtime dashboard + + + Orange Meets demo app + diff --git a/src/content/docs/realtime/introduction.mdx b/src/content/docs/realtime/introduction.mdx new file mode 100644 index 00000000000000..fd666ee802db1d --- /dev/null +++ b/src/content/docs/realtime/introduction.mdx @@ -0,0 +1,45 @@ +--- +pcx_content_type: overview +title: Introduction +sidebar: + order: 2 + +--- + +Cloudflare Realtime can be used to add realtime audio, video and data into your applications. Cloudflare Realtime uses WebRTC, which is the lowest latency way to communicate across a broad range of platforms like browsers, mobile, and native apps. + +Realtime integrates with your backend and frontend application to add realtime functionality. + +## Why Cloudflare Realtime exists + +* **It is difficult to scale WebRTC**: Many struggle scaling WebRTC servers. Operators run into issues about how many users can be in the same "room" or want to build unique solutions that do not fit into the current concepts in high level APIs. + +* **High egress costs**: WebRTC is expensive to use as managed solutions charge a high premium on cloud egress and running your own servers incur system administration and scaling overhead. Cloudflare already has 300+ locations with upwards of 1,000 servers in some locations. Cloudflare Realtime scales easily on top of this architecture and can offer the lowest WebRTC usage costs. + +* **WebRTC is growing**: Developers are realizing that WebRTC is not just for video conferencing. WebRTC is supported on many platforms, it is mature and well understood. + +## What makes Cloudflare Realtime unique + +* **Unopinionated**: Cloudflare Realtime does not offer a SDK. It instead allows you to access raw WebRTC to solve unique problems that might not fit into existing concepts. The API is deliberately simple. + +* **No rooms**: Unlike other WebRTC products, Cloudflare Realtime lets you be in charge of each track (audio/video/data) instead of offering abstractions such as rooms. You define the presence protocol on top of simple pub/sub. Each end user can publish and subscribe to audio/video/data tracks as they wish. + +* **No lock-in**: You can use Cloudflare Realtime to solve scalability issues with your SFU. You can use in combination with peer-to-peer architecture. You can use Cloudflare Realtime standalone. To what extent you use Cloudflare Realtime is up to you. + +## What exactly does Cloudflare Realtime do? + +* **SFU**: Realtime is a special kind of pub/sub server that is good at forwarding media data to clients that subscribe to certain data. Each client connects to Cloudflare Realtime via WebRTC and either sends data, receives data or both using WebRTC. This can be audio/video tracks or DataChannels. + +* **It scales**: All Cloudflare servers act as a single server so millions of WebRTC clients can connect to Cloudflare Realtime. Each can send data, receive data or both with other clients. + +## How most developers get started + +1. Get started with the echo example, which you can download from the Cloudflare dashboard when you create a Realtime App or from [demos](/realtime/demos/). This will show you how to send and receive audio and video. + +2. Understand how you can manipulate who can receive what media by passing around session and track ids. Remember, you control who receives what media. Each media track is represented by a unique ID. It is your responsibility to save and distribute this ID. + +:::note[Realtime is not a presence protocol] +Realtime does not know what a room is. It only knows media tracks. It is up to you to make a room by saving who is in a room along with track IDs that unique identify media tracks. If each participant publishes their audio/video, and receives audio/video from each other, you have got yourself a video conference! +::: + +3. Create an app where you manage each connection to Cloudflare Realtime and the track IDs created by each connection. You can use any tool to save and share tracks. Check out the example apps at [demos](/realtime/demos/), such as [Orange Meets](https://github.com/cloudflare/orange), which is a full-fledged video conferencing app that uses [Workers Durable Objects](/durable-objects/) to keep track of track IDs. diff --git a/src/content/docs/calls/limits.mdx b/src/content/docs/realtime/limits.mdx similarity index 83% rename from src/content/docs/calls/limits.mdx rename to src/content/docs/realtime/limits.mdx index be1267acb8c34c..f697d3b63acdbc 100644 --- a/src/content/docs/calls/limits.mdx +++ b/src/content/docs/realtime/limits.mdx @@ -6,7 +6,7 @@ sidebar: --- -Understanding the limits and timeouts of Cloudflare Calls is crucial for optimizing the performance and reliability of your applications. This section outlines the key constraints and behaviors you should be aware of when integrating Cloudflare Calls into your app. +Understanding the limits and timeouts of Cloudflare Realtime is crucial for optimizing the performance and reliability of your applications. This section outlines the key constraints and behaviors you should be aware of when integrating Cloudflare Realtime into your app. ## Free @@ -15,7 +15,7 @@ Understanding the limits and timeouts of Cloudflare Calls is crucial for optimiz ## Limits -* **API Calls per Session**: You can make up to 50 API calls per second for each session. There is no ratelimit on a App basis, just sessions. +* **API Realtime per Session**: You can make up to 50 API calls per second for each session. There is no ratelimit on a App basis, just sessions. * **Tracks per API Call**: Up to 64 tracks can be added with a single API call. If you need to add more tracks to a session, you should distribute them across multiple API calls. diff --git a/src/content/docs/realtime/pricing.mdx b/src/content/docs/realtime/pricing.mdx new file mode 100644 index 00000000000000..0f41c6c7e98767 --- /dev/null +++ b/src/content/docs/realtime/pricing.mdx @@ -0,0 +1,22 @@ +--- +pcx_content_type: concept +title: Pricing +sidebar: + order: 15 +--- + +Cloudflare Realtime billing is based on data sent from Cloudflare edge to your application. + +Cloudflare Realtime SFU and TURN services cost $0.05 per GB of data egress. + +There is a free tier of 1,000 GB before any charges start. This free tier includes usage from both SFU and TURN services, not two independent free tiers. Cloudflare Realtime billing appears as a single line item on your Cloudflare bill, covering both SFU and TURN. + +Traffic between Cloudflare Realtime TURN and Cloudflare Realtime SFU or Cloudflare Stream (WHIP/WHEP) does not get double charged, so if you are using both SFU and TURN at the same time, you will get charged for only one. + +### TURN + +Please see the [TURN FAQ page](/realtime/turn/faq), where there is additional information on speficially which traffic path from RFC8656 is measured and counts towards billing. + +### SFU + +Only traffic originating from Cloudflare towards clients incurs charges. Traffic pushed to Cloudflare incurs no charge even if there is no client pulling same traffic from Cloudflare. diff --git a/src/content/docs/realtime/sessions-tracks.mdx b/src/content/docs/realtime/sessions-tracks.mdx new file mode 100644 index 00000000000000..9104f66927de2f --- /dev/null +++ b/src/content/docs/realtime/sessions-tracks.mdx @@ -0,0 +1,45 @@ +--- +pcx_content_type: get-started +title: Sessions and Tracks +sidebar: + order: 3 + +--- + +Cloudflare Realtime offers a simple yet powerful framework for building real-time experiences. At the core of this system are three key concepts: **Applications**, **Sessions** and **Tracks**. Familiarizing yourself with these concepts is crucial for using Realtime. + +## Application + +A Realtime Application is an environment within different Sessions and Tracks can interact. Examples of this could be production, staging or different environments where you'd want separation between Sessions and Tracks. Cloudflare Realtime usage can be queried at Application, Session or Track level. + +## Sessions + +A **Session** in Cloudflare Realtime correlates directly to a WebRTC PeerConnection. It represents the establishment of a communication channel between a client and the nearest Cloudflare data center, as determined by Cloudflare's anycast routing. Typically, a client will maintain a single Session, encompassing all communications between the client and Cloudflare. + +* **One-to-One Mapping with PeerConnection**: Each Session is a direct representation of a WebRTC PeerConnection, facilitating real-time media data transfer. +* **Anycast Routing**: The client connects to the closest Cloudflare data center, optimizing latency and performance. +* **Unified Communication Channel**: A single Session can handle all types of communication between a client and Cloudflare, ensuring streamlined data flow. + +## Tracks + +Within a Session, there can be one or more **Tracks**. + +* **Tracks map to MediaStreamTrack**: Tracks align with the MediaStreamTrack concept, facilitating audio, video, or data transmission. +* **Globally Unique Ids**: When you push a track to Cloudflare, it is assigned a unique ID, which can then be used to pull the track into another session elsewhere. +* **Available globally**: The ability to push and pull tracks is central to what makes Realtime a versatile tool for real-time applications. Each track is available globally to be retrieved from any Session within an App. + +## Realtime as a Programmable "Switchboard" + +The analogy of a switchboard is apt for understanding Realtime. Historically, switchboard operators connected calls by manually plugging in jacks. Similarly, Realtime allows for the dynamic routing of media streams, acting as a programmable switchboard for modern real-time communication. + +## Beyond "Rooms", "Users", and "Participants" + +While many SFUs utilize concepts like "rooms" to manage media streams among users, this approach has scalability and flexibility limitations. Cloudflare Realtime opts for a more granular and flexible model with Sessions and Tracks, enabling a wide range of use cases: + +* Large-scale remote events, like 'fireside chats' with thousands of participants. +* Interactive conversations with the ability to bring audience members "on stage." +* Educational applications where an instructor can present to multiple virtual classrooms simultaneously. + +### Presence Protocol vs. Media Flow + +Realtime distinguishes between the presence protocol and media flow, allowing for scalability and flexibility in real-time applications. This separation enables developers to craft tailored experiences, from intimate calls to massive, low-latency broadcasts. diff --git a/src/content/docs/calls/turn/analytics.mdx b/src/content/docs/realtime/turn/analytics.mdx similarity index 92% rename from src/content/docs/calls/turn/analytics.mdx rename to src/content/docs/realtime/turn/analytics.mdx index 0bea60db028204..6ab7b16f5f24d6 100644 --- a/src/content/docs/calls/turn/analytics.mdx +++ b/src/content/docs/realtime/turn/analytics.mdx @@ -5,13 +5,13 @@ sidebar: --- -Cloudflare Calls TURN service counts ingress and egress usage in bytes. You can access this real-time and historical data using the TURN analytics API. You can see TURN usage data in a time series or aggregate that shows traffic in bytes over time. +Cloudflare Realtime TURN service counts ingress and egress usage in bytes. You can access this real-time and historical data using the TURN analytics API. You can see TURN usage data in a time series or aggregate that shows traffic in bytes over time. Cloudflare TURN analytics is available over the GraphQL API only. :::note[API token permissions] -You will need the "Account Analytics" permission on your API token to make queries to the Calls GraphQL API. +You will need the "Account Analytics" permission on your API token to make queries to the Realtime GraphQL API. ::: :::note @@ -31,7 +31,7 @@ You can filter the data in TURN analytics on: :::note -[Custom identifiers](/calls/turn/replacing-existing/#tag-users-with-custom-identifiers) are useful for accounting usage for different users in your system. +[Custom identifiers](/realtime/turn/replacing-existing/#tag-users-with-custom-identifiers) are useful for accounting usage for different users in your system. ::: diff --git a/src/content/docs/calls/turn/custom-domains.mdx b/src/content/docs/realtime/turn/custom-domains.mdx similarity index 81% rename from src/content/docs/calls/turn/custom-domains.mdx rename to src/content/docs/realtime/turn/custom-domains.mdx index 4e5709f3b07e66..afcaf192d0d385 100644 --- a/src/content/docs/calls/turn/custom-domains.mdx +++ b/src/content/docs/realtime/turn/custom-domains.mdx @@ -6,7 +6,7 @@ sidebar: --- -Cloudflare Calls TURN service supports using custom domains for UDP, and TCP - but not TLS protocols. Custom domains do not affect any of the performance of Cloudflare Calls TURN and is set up via a simple CNAME DNS record on your domain. +Cloudflare Realtime TURN service supports using custom domains for UDP, and TCP - but not TLS protocols. Custom domains do not affect any of the performance of Cloudflare Realtime TURN and is set up via a simple CNAME DNS record on your domain. | Protocol | Custom domains | Primary port | Alternate port | | ------------- | -------------- | ------------ | -------------- | @@ -37,4 +37,4 @@ If Cloudflare's authoritative DNS service is used, the record must be set to [DN ::: -There is no additional charge to using a custom hostname with Cloudflare Calls TURN. +There is no additional charge to using a custom hostname with Cloudflare Realtime TURN. diff --git a/src/content/docs/calls/turn/faq.mdx b/src/content/docs/realtime/turn/faq.mdx similarity index 53% rename from src/content/docs/calls/turn/faq.mdx rename to src/content/docs/realtime/turn/faq.mdx index 3b0cad59cbc3f5..1da7613b5dfba2 100644 --- a/src/content/docs/calls/turn/faq.mdx +++ b/src/content/docs/realtime/turn/faq.mdx @@ -7,23 +7,23 @@ sidebar: ## General -### What is Cloudflare Calls TURN pricing? How exactly is it calculated? +### What is Cloudflare Realtime TURN pricing? How exactly is it calculated? Cloudflare TURN pricing is based on the data sent from the Cloudflare edge to the TURN client, as described in [RFC 8656 Figure 1](https://datatracker.ietf.org/doc/html/rfc8656#fig-turn-model). This means data sent from the TURN server to the TURN client and captures all data, including TURN overhead, following successful authentication. -Pricing for Cloudflare Calls TURN service is $0.05 per GB of data used. +Pricing for Cloudflare Realtime TURN service is $0.05 per GB of data used. Cloudflare's STUN service at `stun.cloudflare.com` is free and unlimited. -There is a free tier of 1,000 GB before any charges start. Cloudflare Calls billing appears as a single line item on your Cloudflare bill, covering both SFU and TURN. +There is a free tier of 1,000 GB before any charges start. Cloudflare Realtime billing appears as a single line item on your Cloudflare bill, covering both SFU and TURN. -Traffic between Cloudflare Calls TURN and Cloudflare Calls SFU or Cloudflare Stream (WHIP/WHEP) does not incur any charges. +Traffic between Cloudflare Realtime TURN and Cloudflare Realtime SFU or Cloudflare Stream (WHIP/WHEP) does not incur any charges.
```mermaid --- -title: Cloudflare Calls TURN pricing +title: Cloudflare Realtime TURN pricing --- flowchart LR Client[TURN Client] @@ -37,29 +37,29 @@ flowchart LR
-### Is Calls TURN HIPAA/GDPR/FedRAMP compliant? +### Is Realtime TURN HIPAA/GDPR/FedRAMP compliant? Please view Cloudflare's [certifications and compliance resources](https://www.cloudflare.com/trust-hub/compliance-resources/) and contact your Cloudflare enterprise account manager for more information. -### Is Calls TURN end-to-end encrypted? +### Is Realtime TURN end-to-end encrypted? TURN protocol, [RFC 8656](https://datatracker.ietf.org/doc/html/rfc8656), does not discuss encryption beyond wrapper protocols such as TURN over TLS. If you are using TURN with WebRTC will encrypt data at the WebRTC level. -### What regions does Cloudflare Calls TURN operate at? +### What regions does Cloudflare Realtime TURN operate at? -Cloudflare Calls TURN server runs on [Cloudflare's global network](https://www.cloudflare.com/network) - a growing global network of thousands of machines distributed across hundreds of locations, with the notable exception of the Cloudflare's [China Network](/china-network/). +Cloudflare Realtime TURN server runs on [Cloudflare's global network](https://www.cloudflare.com/network) - a growing global network of thousands of machines distributed across hundreds of locations, with the notable exception of the Cloudflare's [China Network](/china-network/). -### Does Cloudflare Calls TURN use the Cloudflare Backbone or is there any "magic" Cloudflare do to speed connection up? +### Does Cloudflare Realtime TURN use the Cloudflare Backbone or is there any "magic" Cloudflare do to speed connection up? -Cloudflare Calls TURN allocations are homed in the nearest available Cloudflare data center to the TURN client via anycast routing. If both ends of a connection are using Cloudflare Calls TURN, Cloudflare will be able to control the routing and, if possible, route TURN packets through the Cloudflare backbone. +Cloudflare Realtime TURN allocations are homed in the nearest available Cloudflare data center to the TURN client via anycast routing. If both ends of a connection are using Cloudflare Realtime TURN, Cloudflare will be able to control the routing and, if possible, route TURN packets through the Cloudflare backbone. -### What is the difference between Cloudflare Calls TURN with a enterprise plan vs self-serve (pay with your credit card) plans? +### What is the difference between Cloudflare Realtime TURN with a enterprise plan vs self-serve (pay with your credit card) plans? -There is no performance or feature level difference for Cloudflare Calls TURN service in enterprise or self-serve plans, however those on [enterprise plans](https://www.cloudflare.com/enterprise/) will get the benefit of priority support, predictable flat-rate pricing and SLA guarantees. +There is no performance or feature level difference for Cloudflare Realtime TURN service in enterprise or self-serve plans, however those on [enterprise plans](https://www.cloudflare.com/enterprise/) will get the benefit of priority support, predictable flat-rate pricing and SLA guarantees. -### Does Cloudflare Calls TURN run in the Cloudflare China Network? +### Does Cloudflare Realtime TURN run in the Cloudflare China Network? -Cloudflare's [China Network](/china-network/) does not participate in serving Calls traffic and TURN traffic from China will connect to Cloudflare locations outside of China. +Cloudflare's [China Network](/china-network/) does not participate in serving Realtime traffic and TURN traffic from China will connect to Cloudflare locations outside of China. ### How long does it take for TURN activity to be available in analytics? @@ -67,9 +67,9 @@ TURN usage shows up in analytics in 30 seconds. ## Technical -### I need to allowlist (whitelist) Cloudflare Calls TURN IP addresses. Which IP addresses should I use? +### I need to allowlist (whitelist) Cloudflare Realtime TURN IP addresses. Which IP addresses should I use? -Cloudflare Calls TURN is easy to use by IT administrators who have strict firewalls because it requires very few IP addresses to be allowlisted compared to other providers. You must allowlist both IPv6 and IPv4 addresses. +Cloudflare Realtime TURN is easy to use by IT administrators who have strict firewalls because it requires very few IP addresses to be allowlisted compared to other providers. You must allowlist both IPv6 and IPv4 addresses. Please allowlist the following IP addresses: @@ -96,19 +96,19 @@ Although this is not recommended, we understand there is a very small set of cir TURN service at `turn.cloudflare.com` will also respond to binding requests ("STUN requests"). -### Does Cloudflare Calls TURN support the expired IETF RFC draft "draft-uberti-behave-turn-rest-00"? +### Does Cloudflare Realtime TURN support the expired IETF RFC draft "draft-uberti-behave-turn-rest-00"? -The Cloudflare Calls credential generation function returns a JSON structure similar to the [expired RFC draft "draft-uberti-behave-turn-rest-00"](https://datatracker.ietf.org/doc/html/draft-uberti-behave-turn-rest-00), but it does not include the TTL value. If you need a response in this format, you can modify the JSON from the Cloudflare Calls credential generation endpoint to the required format in your backend server or Cloudflare Workers. +The Cloudflare Realtime credential generation function returns a JSON structure similar to the [expired RFC draft "draft-uberti-behave-turn-rest-00"](https://datatracker.ietf.org/doc/html/draft-uberti-behave-turn-rest-00), but it does not include the TTL value. If you need a response in this format, you can modify the JSON from the Cloudflare Realtime credential generation endpoint to the required format in your backend server or Cloudflare Workers. -### I am observing packet loss when using Cloudflare Calls TURN - how can I debug this? +### I am observing packet loss when using Cloudflare Realtime TURN - how can I debug this? Packet loss is normal in UDP and can happen occasionally even on reliable connections. However, if you observe systematic packet loss, consider the following: -- Are you sending or receiving data at a high rate (>50-100Mbps) from a single TURN client? Calls TURN might be dropping packets to signal you to slow down. -- Are you sending or receiving large amounts of data with very small packet sizes (high packet rate > 5-10kpps) from a single TURN client? Cloudflare Calls might be dropping packets. +- Are you sending or receiving data at a high rate (>50-100Mbps) from a single TURN client? Realtime TURN might be dropping packets to signal you to slow down. +- Are you sending or receiving large amounts of data with very small packet sizes (high packet rate > 5-10kpps) from a single TURN client? Cloudflare Realtime might be dropping packets. - Are you sending packets to new unique addresses at a high rate resembling to [port scanning](https://en.wikipedia.org/wiki/Port_scanner) behavior? -### I plan to use Calls TURN at scale. What is the rate at which I can issue credentials? +### I plan to use Realtime TURN at scale. What is the rate at which I can issue credentials? There is no defined limit for credential issuance. Start at 500 credentials/sec and scale up linearly. Ensure you use more than 50% of the issued credentials. @@ -116,24 +116,24 @@ There is no defined limit for credential issuance. Start at 500 credentials/sec You can set a expiration time for a credential up to 48 hours in the future. If you need your TURN allocation to last longer than this, you will need to [update](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/setConfiguration) the TURN credentials. -### Does Calls TURN support IPv6? +### Does Realtime TURN support IPv6? -Yes. Cloudflare Calls is available over both IPv4 and IPv6 for TURN Client to TURN server communication, however it does not issue relay addresses in IPv6 as described in [RFC 6156](https://datatracker.ietf.org/doc/html/rfc6156). +Yes. Cloudflare Realtime is available over both IPv4 and IPv6 for TURN Client to TURN server communication, however it does not issue relay addresses in IPv6 as described in [RFC 6156](https://datatracker.ietf.org/doc/html/rfc6156). -### Does Calls TURN issue IPv6 relay addresses? +### Does Realtime TURN issue IPv6 relay addresses? -No. Calls TURN will not respect `REQUESTED-ADDRESS-FAMILY` STUN attribute if specified and will issue IPv4 addresses only. +No. Realtime TURN will not respect `REQUESTED-ADDRESS-FAMILY` STUN attribute if specified and will issue IPv4 addresses only. -### Does Calls TURN support TCP relaying? +### Does Realtime TURN support TCP relaying? -No. Calls does not implement [RFC6062](https://datatracker.ietf.org/doc/html/rfc6062) and will not respect `REQUESTED-TRANSPORT` STUN attribute. +No. Realtime does not implement [RFC6062](https://datatracker.ietf.org/doc/html/rfc6062) and will not respect `REQUESTED-TRANSPORT` STUN attribute. ### I am unable to make CreatePermission or ChannelBind requests with certain IP addresses. Why is that? -Cloudflare Calls denies CreatePermission or ChannelBind requests if private IP ranges (e.g loopback addresses, linklocal unicast or multicast blocks) or IP addresses that are part of [BYOIP](/byoip/) are used. +Cloudflare Realtime denies CreatePermission or ChannelBind requests if private IP ranges (e.g loopback addresses, linklocal unicast or multicast blocks) or IP addresses that are part of [BYOIP](/byoip/) are used. -If you are a Cloudflare BYOIP customer and wish to connect to your BYOIP ranges with Calls TURN, please reach out to your account manager for further details. +If you are a Cloudflare BYOIP customer and wish to connect to your BYOIP ranges with Realtime TURN, please reach out to your account manager for further details. ### What will happen if TURN credentials expire while the TURN allocation is in use? -Cloudflare Calls will immediately stop billing and recording usage for analytics. After a short delay, the connection will be disconnected. +Cloudflare Realtime will immediately stop billing and recording usage for analytics. After a short delay, the connection will be disconnected. diff --git a/src/content/docs/calls/turn/generate-credentials.mdx b/src/content/docs/realtime/turn/generate-credentials.mdx similarity index 100% rename from src/content/docs/calls/turn/generate-credentials.mdx rename to src/content/docs/realtime/turn/generate-credentials.mdx diff --git a/src/content/docs/calls/turn/index.mdx b/src/content/docs/realtime/turn/index.mdx similarity index 75% rename from src/content/docs/calls/turn/index.mdx rename to src/content/docs/realtime/turn/index.mdx index 13d2e3371917f7..0d083db6171995 100644 --- a/src/content/docs/calls/turn/index.mdx +++ b/src/content/docs/realtime/turn/index.mdx @@ -5,9 +5,9 @@ sidebar: order: 10 --- -Separately from the SFU, Calls offers a managed TURN service. TURN acts as a relay point for traffic between WebRTC clients like the browser and SFUs, particularly in scenarios where direct communication is obstructed by NATs or firewalls. TURN maintains an allocation of public IP addresses and ports for each session, ensuring connectivity even in restrictive network environments. +Separately from the SFU, Realtime offers a managed TURN service. TURN acts as a relay point for traffic between WebRTC clients like the browser and SFUs, particularly in scenarios where direct communication is obstructed by NATs or firewalls. TURN maintains an allocation of public IP addresses and ports for each session, ensuring connectivity even in restrictive network environments. -Using Cloudflare Calls TURN service is available free of charge when used together with the Calls SFU. Otherwise, it costs $0.05/real-time GB outbound from Cloudflare to the TURN client. +Using Cloudflare Realtime TURN service is available free of charge when used together with the Realtime SFU. Otherwise, it costs $0.05/real-time GB outbound from Cloudflare to the TURN client. ## Service address and ports @@ -24,11 +24,11 @@ Use of alternate port 53 only by itself is not reccomended. Port 53 is blocked b ## Regions -Calls TURN service is available in every Cloudflare data center. +Realtime TURN service is available in every Cloudflare data center. When a client tries to connect to `turn.cloudflare.com`, it _automatically_ connects to the Cloudflare location closest to them. We achieve this using anycast routing. -To learn more about the architecture that makes this possible, read this [technical deep-dive about Calls](https://blog.cloudflare.com/cloudflare-calls-anycast-webrtc). +To learn more about the architecture that makes this possible, read this [technical deep-dive about Realtime](https://blog.cloudflare.com/cloudflare-calls-anycast-webrtc). ## Protocols and Ciphers for TURN over TLS @@ -48,11 +48,11 @@ TLS versions supported include TLS 1.1, TLS 1.2, and TLS 1.3. ## MTU -There is no specific MTU limit for Cloudflare Calls TURN service. +There is no specific MTU limit for Cloudflare Realtime TURN service. ## Limits -Cloudflare Calls TURN service places limits on: +Cloudflare Realtime TURN service places limits on: - Unique IP address you can communicate with per relay allocation (>5 new IP/sec) - Packet rate outbound and inbound to the relay allocation (>5-10 kpps) diff --git a/src/content/docs/calls/turn/replacing-existing.mdx b/src/content/docs/realtime/turn/replacing-existing.mdx similarity index 78% rename from src/content/docs/calls/turn/replacing-existing.mdx rename to src/content/docs/realtime/turn/replacing-existing.mdx index 5bcf0c2ed642ab..4eaa2f529d2cd3 100644 --- a/src/content/docs/calls/turn/replacing-existing.mdx +++ b/src/content/docs/realtime/turn/replacing-existing.mdx @@ -6,11 +6,11 @@ sidebar: --- -If you are a existing TURN provider but would like to switch to providing Cloudflare Calls TURN for your customers, there is a few considerations. +If you are a existing TURN provider but would like to switch to providing Cloudflare Realtime TURN for your customers, there is a few considerations. ## Benefits -Cloudflare Calls TURN service can reduce tangible and untangible costs associated with TURN servers: +Cloudflare Realtime TURN service can reduce tangible and untangible costs associated with TURN servers: * Server costs (AWS EC2 etc) * Bandwidth costs (Egress, load balancing etc) @@ -23,13 +23,13 @@ Cloudflare Calls TURN service can reduce tangible and untangible costs associate ### Separate environments with TURN keys -When using Cloudflare Calls TURN service at scale, consider separating environments such as "testing", "staging" or "production" with TURN keys. You can create up to 1,000 TURN keys in your account, which can be used to generate end user credentials. +When using Cloudflare Realtime TURN service at scale, consider separating environments such as "testing", "staging" or "production" with TURN keys. You can create up to 1,000 TURN keys in your account, which can be used to generate end user credentials. There is no limit to how many end-user credentials you can create with a particular TURN key. ### Tag users with custom identifiers -Cloudflare Calls TURN service lets you tag each credential with a custom identifier as you generate a credential like below: +Cloudflare Realtime TURN service lets you tag each credential with a custom identifier as you generate a credential like below: ```bash null {4} curl https://rtc.live.cloudflare.com/v1/turn/keys/$TURN_KEY_ID/credentials/generate \ @@ -42,11 +42,11 @@ Use this field to aggregate usage for a specific user or group of users and coll ### Monitor usage -You can monitor account wide usage with the [GraphQL analytics API](/calls/turn/analytics/). This is useful for keeping track of overall usage for billing purposes, watching for unexpected changes. You can get timeseries data from TURN analytics with various filters in place. +You can monitor account wide usage with the [GraphQL analytics API](/realtime/turn/analytics/). This is useful for keeping track of overall usage for billing purposes, watching for unexpected changes. You can get timeseries data from TURN analytics with various filters in place. ### Monitor for credential abuse -If you share TURN credentials with end users, credential abuse is possible. You can monitor for abuse by tagging each credential with custom identifiers and monitoring for top custom identifiers in your application via the [GraphQL analytics API](/calls/turn/analytics/). +If you share TURN credentials with end users, credential abuse is possible. You can monitor for abuse by tagging each credential with custom identifiers and monitoring for top custom identifiers in your application via the [GraphQL analytics API](/realtime/turn/analytics/). ## How to bill end users for their TURN usage @@ -64,7 +64,7 @@ By following these guidelines and understanding how TURN analytics handles sampl :::note -Cloudflare Calls only bills for traffic from Cloudflare's servers to your client, called `egressBytes`. +Cloudflare Realtime only bills for traffic from Cloudflare's servers to your client, called `egressBytes`. ::: diff --git a/src/content/docs/calls/turn/rfc-matrix.mdx b/src/content/docs/realtime/turn/rfc-matrix.mdx similarity index 95% rename from src/content/docs/calls/turn/rfc-matrix.mdx rename to src/content/docs/realtime/turn/rfc-matrix.mdx index 87fc91f8de1bd3..91b578bc685c4f 100644 --- a/src/content/docs/calls/turn/rfc-matrix.mdx +++ b/src/content/docs/realtime/turn/rfc-matrix.mdx @@ -20,7 +20,7 @@ sidebar: | Protocol | Support | Relevant specification | | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- | | TURN (base RFC) | ✅ | [RFC 5766](https://datatracker.ietf.org/doc/html/rfc5766) | -| TURN REST API | ✅ (See [FAQ](/calls/turn/faq/#does-cloudflare-calls-turn-support-the-expired-ietf-rfc-draft-draft-uberti-behave-turn-rest-00)) | [draft-uberti-behave-turn-rest-00](http://tools.ietf.org/html/draft-uberti-behave-turn-rest-00) | +| TURN REST API | ✅ (See [FAQ](/realtime/turn/faq/#does-cloudflare-calls-turn-support-the-expired-ietf-rfc-draft-draft-uberti-behave-turn-rest-00)) | [draft-uberti-behave-turn-rest-00](http://tools.ietf.org/html/draft-uberti-behave-turn-rest-00) | | Origin field in TURN (Multi-tenant TURN Server) | ✅ | [draft-ietf-tram-stun-origin-06](https://tools.ietf.org/html/draft-ietf-tram-stun-origin-06) | | ALPN support for STUN & TURN | ✅ | [RFC 7443](https://datatracker.ietf.org/doc/html/rfc7443) | | TURN Bandwidth draft specs | No | [draft-thomson-tram-turn-bandwidth-01](http://tools.ietf.org/html/draft-thomson-tram-turn-bandwidth-01) | diff --git a/src/content/docs/calls/turn/what-is-turn.mdx b/src/content/docs/realtime/turn/what-is-turn.mdx similarity index 97% rename from src/content/docs/calls/turn/what-is-turn.mdx rename to src/content/docs/realtime/turn/what-is-turn.mdx index d8eaed1e673621..3e15efe3f6d070 100644 --- a/src/content/docs/calls/turn/what-is-turn.mdx +++ b/src/content/docs/realtime/turn/what-is-turn.mdx @@ -21,7 +21,7 @@ You can use TURN directly in your application too. [Pion](https://github.com/pio 1. **NAT (Network Address Translation)**: A method used by routers to map multiple private IP addresses to a single public IP address. This is commonly done by home internet routers so multiple computers in the same network can share a single public IP address. -2. **TURN Server**: A relay server that acts as an intermediary for traffic between clients behind NATs. Cloudflare Calls TURN service is a example of a TURN server. +2. **TURN Server**: A relay server that acts as an intermediary for traffic between clients behind NATs. Cloudflare Realtime TURN service is a example of a TURN server. 3. **TURN Client**: An application or device that uses the TURN protocol to communicate through a TURN server. This is your application. It can be a web application using the WebRTC APIs or a native application running on mobile or desktop. diff --git a/src/content/partials/fundamentals/account-permissions-table.mdx b/src/content/partials/fundamentals/account-permissions-table.mdx index 75fdfd5aa0fc97..d260ebef39567e 100644 --- a/src/content/partials/fundamentals/account-permissions-table.mdx +++ b/src/content/partials/fundamentals/account-permissions-table.mdx @@ -53,8 +53,8 @@ import { Markdown } from "~/components"; | China Network Steering {props.editWord} | Grants write access to [China Network Steering](/china-network/). | | Cloudchamber Read | Grants read access to Cloudchamber deployments. | | Cloudchamber {props.editWord} | Grants write access to Cloudchamber deployments. | -| { props.src === "dash" && "Cloudflare" } Calls Read | Grants read access to Cloudflare Calls. | -| { props.src === "dash" && "Cloudflare" } Calls {props.editWord} | Grants write access to Cloudflare Calls. | +| { props.src === "dash" && "Cloudflare" } Realtime Read | Grants read access to Cloudflare Realtime. | +| { props.src === "dash" && "Cloudflare" } Realtime {props.editWord} | Grants write access to Cloudflare Realtime. | | Cloudflare DEX Read | Grants read access to [Digital Experience Monitoring](/cloudflare-one/insights/dex/). | | Cloudflare DEX {props.editWord} | Grants write access to [Digital Experience Monitoring](/cloudflare-one/insights/dex/). | | { props.src === "dash" && "Cloudflare" } Images Read | Grants read access to [Cloudflare Images](/images/). | diff --git a/src/content/products/calls.yaml b/src/content/products/realtime.yaml similarity index 55% rename from src/content/products/calls.yaml rename to src/content/products/realtime.yaml index 5c9c92652bf1f2..c06d3126fc1093 100644 --- a/src/content/products/calls.yaml +++ b/src/content/products/realtime.yaml @@ -1,14 +1,14 @@ -name: Calls +name: Realtime product: - title: Calls - url: /calls/ + title: Realtime + url: /Realtime/ group: Developer platform additional_groups: [Media] meta: - title: Cloudflare Calls docs - description: Documentation for Cloudflare Calls. + title: Cloudflare Realtime docs + description: Documentation for Cloudflare Realtime. author: "@cloudflare" resources: diff --git a/src/content/products/turn.yaml b/src/content/products/turn.yaml index 15e423ff947e4a..33a85d836f2b7d 100644 --- a/src/content/products/turn.yaml +++ b/src/content/products/turn.yaml @@ -1,11 +1,11 @@ -name: Calls TURN Service +name: Realtime TURN Service logo: product: title: TURN Service group: Developer platform additional_groups: [Media] - url: /calls/turn/ + url: /realtime/turn/ meta: - description: Separately from Cloudflare Calls' SFU, Calls offers a managed TURN service. + description: Separately from Cloudflare Realtime's SFU, Realtime offers a managed TURN service. diff --git a/src/content/release-notes/calls.yaml b/src/content/release-notes/calls.yaml index 7a5a23da3488f3..b1ea0e83ef0edc 100644 --- a/src/content/release-notes/calls.yaml +++ b/src/content/release-notes/calls.yaml @@ -1,23 +1,23 @@ --- -link: "/calls/changelog/" -productName: Calls -productLink: "/calls/" +link: "/realtime/changelog/" +productName: Realtime +productLink: "/realtime/" productArea: Developer platform productAreaLink: /workers/platform/changelog/platform/ entries: - publish_date: "2024-09-25" title: TURN service is generally available (GA) description: |- - Cloudflare Calls TURN service is generally available and helps address common challenges with real-time communication. For more information, refer to the [blog post](https://blog.cloudflare.com/webrtc-turn-using-anycast/) or [TURN documentation](/calls/turn/). + Cloudflare Realtime TURN service is generally available and helps address common challenges with real-time communication. For more information, refer to the [blog post](https://blog.cloudflare.com/webrtc-turn-using-anycast/) or [TURN documentation](/realtime/turn/). - publish_date: "2024-04-04" title: Orange Meets availability description: |- Orange Meets, Cloudflare's internal video conferencing app, is open source and available for use from [Github](https://github.com/cloudflare/orange?cf_target_id=40DF7321015C5928F9359DD01303E8C2). - publish_date: "2024-04-04" - title: Cloudflare Calls open beta + title: Cloudflare Realtime open beta description: |- - Cloudflare Calls is in open beta and available from the Cloudflare Dashboard. + Cloudflare Realtime is in open beta and available from the Cloudflare Dashboard. - publish_date: "2022-09-27" - title: Cloudflare Calls closed beta + title: Cloudflare Realtime closed beta description: |- - Cloudflare Calls is available as a closed beta for users who request an invitation. Refer to the [blog post](https://blog.cloudflare.com/announcing-cloudflare-calls/) for more information. + Cloudflare Realtime is available as a closed beta for users who request an invitation. Refer to the [blog post](https://blog.cloudflare.com/announcing-cloudflare-calls/) for more information. diff --git a/src/icons/calls.svg b/src/icons/realtime.svg similarity index 100% rename from src/icons/calls.svg rename to src/icons/realtime.svg From 02e80d1ef6a175b9b95935f85f0e37f7878e9de5 Mon Sep 17 00:00:00 2001 From: kodster28 Date: Tue, 8 Apr 2025 13:52:02 -0500 Subject: [PATCH 02/11] broken links + redirect --- public/__redirects | 3 +++ .../durable-objects-series-additional-resources.mdx | 7 +++---- src/content/release-notes/calls.yaml | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/public/__redirects b/public/__redirects index 55c33060c7ed8b..bf7bbe9662e90f 100644 --- a/public/__redirects +++ b/public/__redirects @@ -1948,3 +1948,6 @@ /fundamentals/notifications/* /notifications/:splat 301 /support/other-languages/* /support/ 301 /support/speed/* /speed/ 301 + +# Calls +/calls/* /realtime/:splat 301 \ No newline at end of file diff --git a/src/content/partials/learning-paths/durable-objects-series-additional-resources.mdx b/src/content/partials/learning-paths/durable-objects-series-additional-resources.mdx index 68429e629704f2..2ae4d2e0e1d184 100644 --- a/src/content/partials/learning-paths/durable-objects-series-additional-resources.mdx +++ b/src/content/partials/learning-paths/durable-objects-series-additional-resources.mdx @@ -1,6 +1,5 @@ --- {} - --- **Related content** @@ -9,7 +8,7 @@ For additional resources on learning Durable Objects with Cloudflare, refer to t - [Veet Github repository code](https://github.com/megaconfidence/veet) - [Cloudflare Durable Objects documentation](/durable-objects/) - - [Cloudflare TURN service documentation](/calls/turn/) - - [CLI command for creating new Workers and Pages projects](/pages/get-started/c3/) - - [Hopscotch.io for local WebSocket testing](https://hoppscotch.io/) + - [Cloudflare TURN service documentation](/realtime/turn/) + - [CLI command for creating new Workers and Pages projects](/pages/get-started/c3/) + - [Hopscotch.io for local WebSocket testing](https://hoppscotch.io/) - [Sign up for a Cloudflare account](https://dash.cloudflare.com/sign-up) diff --git a/src/content/release-notes/calls.yaml b/src/content/release-notes/calls.yaml index b1ea0e83ef0edc..dc4e99b2ebfd27 100644 --- a/src/content/release-notes/calls.yaml +++ b/src/content/release-notes/calls.yaml @@ -8,7 +8,7 @@ entries: - publish_date: "2024-09-25" title: TURN service is generally available (GA) description: |- - Cloudflare Realtime TURN service is generally available and helps address common challenges with real-time communication. For more information, refer to the [blog post](https://blog.cloudflare.com/webrtc-turn-using-anycast/) or [TURN documentation](/realtime/turn/). + Cloudflare Realtime TURN service is generally available and helps address common challenges with real-time communication. For more information, refer to the [blog post](https://blog.cloudflare.com/webrtc-turn-using-anycast/) or [TURN documentati(/realtime/ltime/turn/). - publish_date: "2024-04-04" title: Orange Meets availability description: |- From 274b264fa7e5814d135e807407cf40ce126b2dd2 Mon Sep 17 00:00:00 2001 From: Denise Pena Date: Tue, 8 Apr 2025 13:59:16 -0500 Subject: [PATCH 03/11] Updated file name in changelog --- src/content/docs/realtime/changelog.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/realtime/changelog.mdx b/src/content/docs/realtime/changelog.mdx index 3afde9d8e4c3b4..48242190ad87e1 100644 --- a/src/content/docs/realtime/changelog.mdx +++ b/src/content/docs/realtime/changelog.mdx @@ -2,7 +2,7 @@ pcx_content_type: changelog title: Changelog release_notes_file_name: - - calls + - realtime --- import { ProductReleaseNotes } from "~/components"; From 93ca3932914918d580cb1009d137a0c9656e52ba Mon Sep 17 00:00:00 2001 From: Denise Pena Date: Tue, 8 Apr 2025 14:01:37 -0500 Subject: [PATCH 04/11] Fixed header link --- src/content/docs/realtime/turn/rfc-matrix.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/realtime/turn/rfc-matrix.mdx b/src/content/docs/realtime/turn/rfc-matrix.mdx index 91b578bc685c4f..2cbdf461ffd1ca 100644 --- a/src/content/docs/realtime/turn/rfc-matrix.mdx +++ b/src/content/docs/realtime/turn/rfc-matrix.mdx @@ -20,7 +20,7 @@ sidebar: | Protocol | Support | Relevant specification | | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- | | TURN (base RFC) | ✅ | [RFC 5766](https://datatracker.ietf.org/doc/html/rfc5766) | -| TURN REST API | ✅ (See [FAQ](/realtime/turn/faq/#does-cloudflare-calls-turn-support-the-expired-ietf-rfc-draft-draft-uberti-behave-turn-rest-00)) | [draft-uberti-behave-turn-rest-00](http://tools.ietf.org/html/draft-uberti-behave-turn-rest-00) | +| TURN REST API | ✅ (See [FAQ](/realtime/turn/faq/#does-cloudflare-realtime-turn-support-the-expired-ietf-rfc-draft-draft-uberti-behave-turn-rest-00)) | [draft-uberti-behave-turn-rest-00](http://tools.ietf.org/html/draft-uberti-behave-turn-rest-00) | | Origin field in TURN (Multi-tenant TURN Server) | ✅ | [draft-ietf-tram-stun-origin-06](https://tools.ietf.org/html/draft-ietf-tram-stun-origin-06) | | ALPN support for STUN & TURN | ✅ | [RFC 7443](https://datatracker.ietf.org/doc/html/rfc7443) | | TURN Bandwidth draft specs | No | [draft-thomson-tram-turn-bandwidth-01](http://tools.ietf.org/html/draft-thomson-tram-turn-bandwidth-01) | From 6822c7fc00b33143d87a331f0630606d0c09ed13 Mon Sep 17 00:00:00 2001 From: kodster28 Date: Tue, 8 Apr 2025 14:05:39 -0500 Subject: [PATCH 05/11] update releasenote file name --- src/content/release-notes/{calls.yaml => realtime.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/content/release-notes/{calls.yaml => realtime.yaml} (100%) diff --git a/src/content/release-notes/calls.yaml b/src/content/release-notes/realtime.yaml similarity index 100% rename from src/content/release-notes/calls.yaml rename to src/content/release-notes/realtime.yaml From b9d411a298f5f0cc4611f0c1f47bed108d41ee0e Mon Sep 17 00:00:00 2001 From: kodster28 Date: Tue, 8 Apr 2025 14:06:48 -0500 Subject: [PATCH 06/11] fix broken link --- src/content/release-notes/realtime.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/release-notes/realtime.yaml b/src/content/release-notes/realtime.yaml index dc4e99b2ebfd27..b1ea0e83ef0edc 100644 --- a/src/content/release-notes/realtime.yaml +++ b/src/content/release-notes/realtime.yaml @@ -8,7 +8,7 @@ entries: - publish_date: "2024-09-25" title: TURN service is generally available (GA) description: |- - Cloudflare Realtime TURN service is generally available and helps address common challenges with real-time communication. For more information, refer to the [blog post](https://blog.cloudflare.com/webrtc-turn-using-anycast/) or [TURN documentati(/realtime/ltime/turn/). + Cloudflare Realtime TURN service is generally available and helps address common challenges with real-time communication. For more information, refer to the [blog post](https://blog.cloudflare.com/webrtc-turn-using-anycast/) or [TURN documentation](/realtime/turn/). - publish_date: "2024-04-04" title: Orange Meets availability description: |- From f1e85298934bb412d03ab48bffcfb052ba6efe50 Mon Sep 17 00:00:00 2001 From: Denise Pena Date: Tue, 8 Apr 2025 14:19:49 -0500 Subject: [PATCH 07/11] Updated old redirect --- public/__redirects | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/__redirects b/public/__redirects index bf7bbe9662e90f..40e468b0f72a75 100644 --- a/public/__redirects +++ b/public/__redirects @@ -264,7 +264,7 @@ /cache/how-to/edge-browser-cache-ttl/create-page-rules/ /cache/how-to/cache-rules/ 301 # Cloudflare Calls -/calls/turn/overview/ /calls/turn/ 301 +/calls/turn/overview/ /realtime/turn/ 301 # china network /support/about-cloudflare/enterprise-documentation/understanding-and-configuring-an-icp-number/ /china-network/concepts/icp/ 301 From 5de30e3e35149a078fa4486093b3704d5bf5917d Mon Sep 17 00:00:00 2001 From: kodster28 Date: Tue, 8 Apr 2025 14:21:33 -0500 Subject: [PATCH 08/11] Updates --- public/calls/static/calls-api-2024-05-21.yaml | 545 ------------------ src/content/docs/calls/calls-vs-sfus.mdx | 47 -- src/content/docs/realtime/calls-vs-sfus.mdx | 17 +- 3 files changed, 8 insertions(+), 601 deletions(-) delete mode 100644 public/calls/static/calls-api-2024-05-21.yaml delete mode 100644 src/content/docs/calls/calls-vs-sfus.mdx diff --git a/public/calls/static/calls-api-2024-05-21.yaml b/public/calls/static/calls-api-2024-05-21.yaml deleted file mode 100644 index 9cfb744171326e..00000000000000 --- a/public/calls/static/calls-api-2024-05-21.yaml +++ /dev/null @@ -1,545 +0,0 @@ -openapi: 3.0.0 -info: - title: Cloudflare Calls API - version: "1.0" -externalDocs: - description: Find out more about Cloudflare Calls - url: https://developers.cloudflare.com/calls/ -servers: - - url: https://rtc.live.cloudflare.com/v1 -paths: - /apps/{appId}/sessions/new: - post: - tags: - - New Session - summary: Create a new PeerConnection - security: - - secret: [] - parameters: - - in: path - name: appId - schema: - type: string - required: true - description: WebRTC application ID - - in: query - name: thirdparty - schema: - type: boolean - description: Session is intended to connect to an ICE-lite peer like a third party SFU/server - - in: query - name: correlationId - schema: - type: string - description: Associate session to an user-provided correlation id - responses: - "201": - description: Created - headers: - vary: - schema: - type: string - example: Origin - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/NewSessionResponse" - - example: - sessionId: e017a2629c754fedc1f7d8587e06d126 - /apps/{appId}/sessions/{sessionId}/tracks/new: - post: - tags: - - Add a track - summary: Solve the given track object(s) and add the track(s) to the WebRTC session - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/TracksRequest" - examples: - local_tracks: - description: Share a track to be played by remote peers - value: - sessionDescription: - sdp: | - v=0 - o=- 0 0 IN IP4 127.0.0.1 - s=- - c=IN IP4 127.0.0.1 - t=0 0 - m=audio 4000 RTP/AVP 111 - a=rtpmap:111 OPUS/48000/2 - m=video 4002 RTP/AVP 96 - a=rtpmap:96 VP8/90000 - ... - type: offer - tracks: - - location: local - mid: "4" - trackName: 1a037563-c35c-4bf6-a9ee-2b474cbb9a51 - remote_tracks: - description: Play a track from a remote peer - value: - tracks: - - location: remote - sessionId: 2a45361d5fd7cc14eface0587c276c94 - trackName: 2e037563-a35d-4bf6-a9ee-2d474cbb9a58 - push_track_with_bidirectional_stream: - description: Share a track through a bidirectional transceiver - value: - sessionDescription: - sdp: | - v=0 - o=- 0 0 IN IP4 127.0.0.1 - s=- - c=IN IP4 127.0.0.1 - t=0 0 - m=audio 4000 RTP/AVP 111 - a=rtpmap:111 OPUS/48000/2 - m=video 4002 RTP/AVP 96 - a=rtpmap:96 VP8/90000 - ... - type: offer - tracks: - - location: local - mid: "0" - trackName: mic-1 - bidirectionalMediaStream: true - kind: "audio" - 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" - push_tracks_with_autodiscover: - description: SFU detects any new track in the offered SDP - value: - autoDiscover: true - sessionDescription: - sdp: | - v=0 - o=- 0 0 IN IP4 127.0.0.1 - s=- - c=IN IP4 127.0.0.1 - t=0 0 - m=audio 4000 RTP/AVP 111 - a=rtpmap:111 OPUS/48000/2 - m=video 4002 RTP/AVP 96 - a=rtpmap:96 VP8/90000 - ... - type: offer - pull_track_with_bidirectional_stream: - description: Pull a track through an existing bidirectional transceiver identified by a mid - value: - tracks: - - location: remote - mid: "#mic-1" - sessionId: 2a45361d5fd7cc14eface0587c276c94 - trackName: generated-audio - kind: "audio" - security: - - secret: [] - parameters: - - in: path - name: appId - schema: - type: string - required: true - description: WebRTC application ID - - in: path - name: sessionId - schema: - type: string - required: true - description: Current PeerConnection session ID - responses: - "200": - description: OK - headers: - vary: - schema: - type: string - example: Origin - content: - application/json: - schema: - $ref: "#/components/schemas/TracksResponse" - examples: - local_tracks: - value: - requiresImmediateRenegotiation: false - tracks: - - trackName: 1a037563-c35c-4bf6-a9ee-2b474cbb9a51 - mid: "4" - sessionDescription: - sdp: | - v=0 - o=- 0 0 IN IP4 127.0.0.1 - s=- - c=IN IP4 127.0.0.1 - t=0 0 - m=audio 4000 RTP/AVP 111 - a=rtpmap:111 OPUS/48000/2 - m=video 4002 RTP/AVP 96 - a=rtpmap:96 VP8/90000 - ... - type: answer - remote_tracks: - value: - requiresImmediateRenegotiation: true - tracks: - - sessionId: 2a45361d5fd7cc14eface0587c276c94 - trackName: 2e037563-a35d-4bf6-a9ee-2d474cbb9a58 - mid: "7" - sessionDescription: - sdp: | - v=0 - o=- 0 0 IN IP4 127.0.0.1 - s=- - c=IN IP4 127.0.0.1 - t=0 0 - m=audio 4000 RTP/AVP 111 - a=rtpmap:111 OPUS/48000/2 - m=video 4002 RTP/AVP 96 - a=rtpmap:96 VP8/90000 - ... - type: offer - /apps/{appId}/sessions/{sessionId}/renegotiate: - put: - tags: - - Renegotiate WebRTC session - summary: When a previous response has requiresImmediateRenegotiation, you must renegotiate - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/RenegotiateRequest" - example: - sessionDescription: - sdp: | - v=0 - o=- 0 0 IN IP4 127.0.0.1 - s=- - c=IN IP4 127.0.0.1 - t=0 0 - m=audio 4000 RTP/AVP 111 - a=rtpmap:111 OPUS/48000/2 - m=video 4002 RTP/AVP 96 - a=rtpmap:96 VP8/90000 - ... - type: answer - security: - - secret: [] - parameters: - - in: path - name: appId - schema: - type: string - required: true - description: WebRTC application ID - - in: path - name: sessionId - schema: - type: string - required: true - responses: - "200": - description: OK - headers: - vary: - schema: - type: string - example: Origin - content: - application/json: - schema: - $ref: "#/components/schemas/RenegotiateResponse" - example: {} - /apps/{appId}/sessions/{sessionId}/tracks/close: - put: - tags: - - Close a track - summary: Close a local or remote track - requestBody: - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/CloseTracksRequest" - - example: - tracks: - - mid: "7" - sessionDescription: - sdp: | - v=0 - o=- 0 0 IN IP4 127.0.0.1 - s=- - c=IN IP4 127.0.0.1 - t=0 0 - m=audio 4000 RTP/AVP 111 - a=rtpmap:111 OPUS/48000/2 - m=video 4002 RTP/AVP 96 - a=rtpmap:96 VP8/90000 - ... - type: offer - force: false - security: - - secret: [] - parameters: - - in: path - name: appId - schema: - type: string - required: true - description: WebRTC application ID - - in: path - name: sessionId - schema: - type: string - required: true - responses: - "200": - description: OK - headers: - vary: - schema: - type: string - example: Origin - content: - application/json: - schema: - $ref: "#/components/schemas/CloseTracksResponse" - example: - sessionDescription: - sdp: | - v=0 - o=- 0 0 IN IP4 127.0.0.1 - s=- - c=IN IP4 127.0.0.1 - t=0 0 - m=audio 4000 RTP/AVP 111 - a=rtpmap:111 OPUS/48000/2 - m=video 4002 RTP/AVP 96 - a=rtpmap:96 VP8/90000 - ... - type: answer - requiresImmediateRenegotiation: false - tracks: - - mid: "7" - /apps/{appId}/sessions/{sessionId}: - get: - tags: - - Get session state - summary: Return the list of tracks associated to the session - security: - - secret: [] - parameters: - - in: path - name: appId - schema: - type: string - required: true - description: WebRTC application ID - - in: path - name: sessionId - schema: - type: string - required: true - responses: - "200": - description: OK - headers: - vary: - schema: - type: string - example: Origin - content: - application/json: - schema: - $ref: "#/components/schemas/GetSessionStateResponse" - example: - tracks: - - location: local - mid: "2" - trackName: 1a037563-c35c-4bf6-a9ee-2b474cbb9a51 - status: active - - location: remote - mid: "7" - sessionId: 2a45361d5fd7cc14eface0587c276c94 - trackName: 2e037563-a35d-4bf6-a9ee-2d474cbb9a58 - status: active - -components: - securitySchemes: - secret: - type: http - scheme: bearer - schemas: - SessionDescription: - type: object - properties: - sdp: - type: string - type: - type: string - enum: - - answer - - offer - TrackObject: - type: object - properties: - location: - type: string - enum: - - local - - remote - description: If you want to share a track, it should be local. If you want to play a track shared by a remote agent, it should be remote - mid: - type: string - description: mid associated to track's transceiver. It also can be prefixed with \# to reference an existing transceiver by its trackName - sessionId: - type: string - description: Session ID of the track owner. It should be set for remote tracks only - trackName: - type: string - description: Given name for the track - bidirectionalMediaStream: - type: boolean - description: Make the associated transceiver bidirectional. This option works only when the SFU generates the offer - kind: - type: string - description: Give a hint to the SFU about the transceiver kind. This is required when the SFU generates the offer - CloseTrackObject: - type: object - properties: - mid: - type: string - description: mid associated to the track's transceiver to close - TracksRequest: - type: object - properties: - sessionDescription: - $ref: "#/components/schemas/SessionDescription" - tracks: - type: array - items: - $ref: "#/components/schemas/TrackObject" - autoDiscover: - type: boolean - description: Assign a random track name to any new track in the offered SDP - TracksResponse: - type: object - properties: - errorCode: - type: string - errorDescription: - type: string - requiresImmediateRenegotiation: - type: boolean - sessionDescription: - $ref: "#/components/schemas/SessionDescription" - tracks: - type: array - items: - allOf: - - $ref: "#/components/schemas/TrackObject" - - properties: - errorCode: - type: string - errorDescription: - type: string - NewSessionRequest: - type: object - properties: - sessionDescription: - $ref: "#/components/schemas/SessionDescription" - NewSessionResponse: - required: - - sessionId - type: object - properties: - errorCode: - type: string - errorDescription: - type: string - sessionDescription: - type: object - properties: - sdp: - type: string - type: - type: string - enum: - - answer - - offer - sessionId: - type: string - CloseTracksRequest: - type: object - properties: - sessionDescription: - $ref: "#/components/schemas/SessionDescription" - tracks: - type: array - items: - $ref: "#/components/schemas/CloseTrackObject" - force: - type: boolean - description: True if you want to stop just the data flow for the tracks, no WebRTC renegotiation - CloseTracksResponse: - type: object - properties: - errorCode: - type: string - errorDescription: - type: string - sessionDescription: - $ref: "#/components/schemas/SessionDescription" - tracks: - type: array - items: - allOf: - - $ref: "#/components/schemas/CloseTrackObject" - - properties: - errorCode: - type: string - errorDescription: - type: string - requiresImmediateRenegotiation: - type: boolean - GetSessionStateResponse: - type: object - properties: - errorCode: - type: string - errorDescription: - type: string - tracks: - type: array - items: - allOf: - - $ref: "#/components/schemas/TrackObject" - - properties: - status: - type: string - enum: - - active - - inactive - - waiting - RenegotiateRequest: - type: object - properties: - sessionDescription: - $ref: "#/components/schemas/SessionDescription" - RenegotiateResponse: - type: object - properties: - errorCode: - type: string - errorDescription: - type: string - sessionDescription: - $ref: "#/components/schemas/SessionDescription" diff --git a/src/content/docs/calls/calls-vs-sfus.mdx b/src/content/docs/calls/calls-vs-sfus.mdx deleted file mode 100644 index f54e969773b50e..00000000000000 --- a/src/content/docs/calls/calls-vs-sfus.mdx +++ /dev/null @@ -1,47 +0,0 @@ ---- -pcx_content_type: get-started -title: Calls vs regular SFUs -sidebar: - order: 4 - ---- - -## Cloudflare Calls vs. Traditional SFUs - -Cloudflare Calls represents a paradigm shift in building real-time applications by leveraging a distributed real-time data plane. It creates a seamless experience in real-time communication, transcending traditional geographical limitations and scalability concerns. Calls is designed for developers looking to integrate WebRTC functionalities in a server-client architecture without delving deep into the complexities of regional scaling or server management. - -### The Limitations of Centralized SFUs - -Selective Forwarding Units (SFUs) play a critical role in managing WebRTC connections by selectively forwarding media streams to participants in a video call. However, their centralized nature introduces inherent limitations: - -* **Regional Dependency:** A centralized SFU requires a specific region for deployment, leading to latency issues for global users except for those in proximity to the selected region. - -* **Scalability Concerns:** Scaling a centralized SFU to meet global demand can be challenging and inefficient, often requiring additional infrastructure and complexity. - -### How is Cloudflare Calls different? - -Cloudflare Calls addresses these limitations by leveraging Cloudflare's global network infrastructure: - -* **Global Distribution Without Regions:** Unlike traditional SFUs, Cloudflare Calls operates on a global scale without regional constraints. It utilizes Cloudflare's extensive network of over 250 locations worldwide to ensure low-latency video forwarding, making it fast and efficient for users globally. - -* **Decentralized Architecture:** There are no dedicated servers for Calls. Every server within Cloudflare's network contributes to handling Calls, ensuring scalability and reliability. This approach mirrors the distributed nature of Cloudflare's products such as 1.1.1.1 DNS or Cloudflare's CDN. - -## How Cloudflare Calls Works - -### Establishing Peer Connections - -To initiate a real-time communication session, an end user's client establishes a WebRTC PeerConnection to the nearest Cloudflare location. This connection benefits from anycast routing, optimizing for the lowest possible latency. - -### Signaling and Media Stream Management - -* **HTTPS API for Signaling:** Cloudflare Calls simplifies signaling with a straightforward HTTPS API. This API manages the initiation and coordination of media streams, enabling clients to push new MediaStreamTracks or request these tracks from the server. - -* **Efficient Media Handling:** Unlike traditional approaches that require multiple connections for different media streams from different clients, Cloudflare Calls maintains a single PeerConnection per client. This streamlined process reduces complexity and improves performance by handling both the push and pull of media through a singular connection. - -### Application-Level Management - -Cloudflare Calls delegates the responsibility of state management and participant tracking to the application layer. Developers are empowered to design their logic for handling events such as participant joins or media stream updates, offering flexibility to create tailored experiences in applications. - -## Getting Started with Cloudflare Calls - -Integrating Cloudflare Calls into your application promises a straightforward and efficient process, removing the hurdles of regional scalability and server management so you can focus on creating engaging real-time experiences for users worldwide. diff --git a/src/content/docs/realtime/calls-vs-sfus.mdx b/src/content/docs/realtime/calls-vs-sfus.mdx index 7023bdf1919c65..1620e2acfce475 100644 --- a/src/content/docs/realtime/calls-vs-sfus.mdx +++ b/src/content/docs/realtime/calls-vs-sfus.mdx @@ -1,9 +1,8 @@ --- pcx_content_type: get-started -title: Realtime vs regular SFUs +title: Realtime vs Regular SFUs sidebar: order: 4 - --- ## Cloudflare Realtime vs. Traditional SFUs @@ -14,17 +13,17 @@ Cloudflare Realtime represents a paradigm shift in building real-time applicatio Selective Forwarding Units (SFUs) play a critical role in managing WebRTC connections by selectively forwarding media streams to participants in a video call. However, their centralized nature introduces inherent limitations: -* **Regional Dependency:** A centralized SFU requires a specific region for deployment, leading to latency issues for global users except for those in proximity to the selected region. +- **Regional Dependency:** A centralized SFU requires a specific region for deployment, leading to latency issues for global users except for those in proximity to the selected region. -* **Scalability Concerns:** Scaling a centralized SFU to meet global demand can be challenging and inefficient, often requiring additional infrastructure and complexity. +- **Scalability Concerns:** Scaling a centralized SFU to meet global demand can be challenging and inefficient, often requiring additional infrastructure and complexity. ### How is Cloudflare Realtime different? Cloudflare Realtime addresses these limitations by leveraging Cloudflare's global network infrastructure: -* **Global Distribution Without Regions:** Unlike traditional SFUs, Cloudflare Realtime operates on a global scale without regional constraints. It utilizes Cloudflare's extensive network of over 250 locations worldwide to ensure low-latency video forwarding, making it fast and efficient for users globally. +- **Global Distribution Without Regions:** Unlike traditional SFUs, Cloudflare Realtime operates on a global scale without regional constraints. It utilizes Cloudflare's extensive network of over 250 locations worldwide to ensure low-latency video forwarding, making it fast and efficient for users globally. -* **Decentralized Architecture:** There are no dedicated servers for Realtime. Every server within Cloudflare's network contributes to handling Realtime, ensuring scalability and reliability. This approach mirrors the distributed nature of Cloudflare's products such as 1.1.1.1 DNS or Cloudflare's CDN. +- **Decentralized Architecture:** There are no dedicated servers for Realtime. Every server within Cloudflare's network contributes to handling Realtime, ensuring scalability and reliability. This approach mirrors the distributed nature of Cloudflare's products such as 1.1.1.1 DNS or Cloudflare's CDN. ## How Cloudflare Realtime Works @@ -34,9 +33,9 @@ To initiate a real-time communication session, an end user's client establishes ### Signaling and Media Stream Management -* **HTTPS API for Signaling:** Cloudflare Realtime simplifies signaling with a straightforward HTTPS API. This API manages the initiation and coordination of media streams, enabling clients to push new MediaStreamTracks or request these tracks from the server. +- **HTTPS API for Signaling:** Cloudflare Realtime simplifies signaling with a straightforward HTTPS API. This API manages the initiation and coordination of media streams, enabling clients to push new MediaStreamTracks or request these tracks from the server. -* **Efficient Media Handling:** Unlike traditional approaches that require multiple connections for different media streams from different clients, Cloudflare Realtime maintains a single PeerConnection per client. This streamlined process reduces complexity and improves performance by handling both the push and pull of media through a singular connection. +- **Efficient Media Handling:** Unlike traditional approaches that require multiple connections for different media streams from different clients, Cloudflare Realtime maintains a single PeerConnection per client. This streamlined process reduces complexity and improves performance by handling both the push and pull of media through a singular connection. ### Application-Level Management @@ -44,4 +43,4 @@ Cloudflare Realtime delegates the responsibility of state management and partici ## Getting Started with Cloudflare Realtime -Integrating Cloudflare Realtime into your application promises a straightforward and efficient process, removing the hurdles of regional scalability and server management so you can focus on creating engaging real-time experiences for users worldwide. \ No newline at end of file +Integrating Cloudflare Realtime into your application promises a straightforward and efficient process, removing the hurdles of regional scalability and server management so you can focus on creating engaging real-time experiences for users worldwide. From c95f21bf6af86c60a5a2e72b570e016f60309c4d Mon Sep 17 00:00:00 2001 From: kodster28 Date: Tue, 8 Apr 2025 14:33:30 -0500 Subject: [PATCH 09/11] api spec path update --- public/__redirects | 1 + src/content/docs/realtime/https-api.mdx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/public/__redirects b/public/__redirects index 40e468b0f72a75..00f5540654a811 100644 --- a/public/__redirects +++ b/public/__redirects @@ -265,6 +265,7 @@ # Cloudflare Calls /calls/turn/overview/ /realtime/turn/ 301 +/calls/static/calls-api-2024-05-21.yaml /realtime/static/realtime-api-2024-05-21.yaml 301 # china network /support/about-cloudflare/enterprise-documentation/understanding-and-configuring-an-icp-number/ /china-network/concepts/icp/ 301 diff --git a/src/content/docs/realtime/https-api.mdx b/src/content/docs/realtime/https-api.mdx index ad8f5981be5d09..160f4cfb0f7692 100644 --- a/src/content/docs/realtime/https-api.mdx +++ b/src/content/docs/realtime/https-api.mdx @@ -20,7 +20,7 @@ Cloudflare Realtime simplifies the management of peer connections and media trac - **Retrieve Session Information**: Fetches detailed information about a specific session. - `GET /apps/{appId}/sessions/{sessionId}` -[View full API and schema (OpenAPI format)](/calls/static/calls-api-2024-05-21.yaml) +[View full API and schema (OpenAPI format)](/realtime/static/realtime-api-2024-05-21.yaml) ## Handling Secrets From c75c899f9c464f655042dada134aab4d27f6f400 Mon Sep 17 00:00:00 2001 From: kodster28 Date: Tue, 8 Apr 2025 14:34:07 -0500 Subject: [PATCH 10/11] broken link --- src/content/docs/realtime/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/realtime/index.mdx b/src/content/docs/realtime/index.mdx index 26c9277c486355..5511bdb8ed8e64 100644 --- a/src/content/docs/realtime/index.mdx +++ b/src/content/docs/realtime/index.mdx @@ -20,7 +20,7 @@ Cloudflare Realtime is infrastructure for real-time audio/video/data application Cloudflare Realtime runs on [Cloudflare's global cloud network](https://www.cloudflare.com/network/) in hundreds of cities worldwide. - + Get started Date: Tue, 8 Apr 2025 14:44:28 -0500 Subject: [PATCH 11/11] Update link --- public/__redirects | 1 - .../{realtime-api-2024-05-21.yaml => calls-api-2024-05-21.yaml} | 0 src/content/docs/realtime/https-api.mdx | 2 +- 3 files changed, 1 insertion(+), 2 deletions(-) rename public/realtime/static/{realtime-api-2024-05-21.yaml => calls-api-2024-05-21.yaml} (100%) diff --git a/public/__redirects b/public/__redirects index 00f5540654a811..40e468b0f72a75 100644 --- a/public/__redirects +++ b/public/__redirects @@ -265,7 +265,6 @@ # Cloudflare Calls /calls/turn/overview/ /realtime/turn/ 301 -/calls/static/calls-api-2024-05-21.yaml /realtime/static/realtime-api-2024-05-21.yaml 301 # china network /support/about-cloudflare/enterprise-documentation/understanding-and-configuring-an-icp-number/ /china-network/concepts/icp/ 301 diff --git a/public/realtime/static/realtime-api-2024-05-21.yaml b/public/realtime/static/calls-api-2024-05-21.yaml similarity index 100% rename from public/realtime/static/realtime-api-2024-05-21.yaml rename to public/realtime/static/calls-api-2024-05-21.yaml diff --git a/src/content/docs/realtime/https-api.mdx b/src/content/docs/realtime/https-api.mdx index 160f4cfb0f7692..dae8a05dc159cb 100644 --- a/src/content/docs/realtime/https-api.mdx +++ b/src/content/docs/realtime/https-api.mdx @@ -20,7 +20,7 @@ Cloudflare Realtime simplifies the management of peer connections and media trac - **Retrieve Session Information**: Fetches detailed information about a specific session. - `GET /apps/{appId}/sessions/{sessionId}` -[View full API and schema (OpenAPI format)](/realtime/static/realtime-api-2024-05-21.yaml) +[View full API and schema (OpenAPI format)](/realtime/static/calls-api-2024-05-21.yaml) ## Handling Secrets