You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Signed URLs and Infrastructure Improvements on Stream Live WebRTC Beta
3
+
description: >
4
+
Dynamically optimize, clip, and resize video from any origin, no storage
5
+
migration needed.
6
+
date: 2025-04-11T12:00:00Z
7
+
---
8
+
9
+
Cloudflare [Stream](/stream/) has completed an infrastructure upgrade for our [Live WebRTC beta](/stream/webrtc-beta/) support which brings increased scalability and improved playback performance to all customers. WebRTC allows broadcasting directly from a browser (or supported WHIP client) with ultra-low latency to tens of thousands of concurrent viewers across the globe.
10
+
11
+
Additionally, as part of this upgrade, the WebRTC beta now supports Signed URLs to protect playback, just like our standard live stream options (HLS/DASH).
12
+
13
+
For more information, learn about the [Stream Live WebRTC beta](/stream/webrtc-beta/).
Copy file name to clipboardExpand all lines: src/content/docs/stream/viewing-videos/securing-your-stream.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,13 +47,13 @@ Response:
47
47
48
48
You can program your app to generate token in two ways:
49
49
50
-
-**Using the /token endpoint to generate signed tokens:** The simplest way to create a signed url token is by calling the /token endpoint. This is recommended for testing purposes or if you are generating less than 10,000 tokens per day.
50
+
-**Low-volume or testing: Use the `/token` endpoint to generate a short-lived signed token.** This is recommended for testing purposes or if you are generating less than 1,000 tokens per day. It requires making an API call to Cloudflare for each token. The default result is valid for 1 hour.
51
51
52
-
-**Using an open-source library:** If you have tens of thousands of daily users and need to generate a high-volume of tokens without calling the /token endpoint _each time_, you can create tokens yourself. This way, you do not need to call a Stream endpoint each time you need to generate a token.
52
+
-**Recommended: Use a signing key to create tokens.** If you have thousands of daily users or need to generate a highvolume of tokens, you can create tokens yourself using a signing key. This way, you do not need to call a Stream API each time you need to generate a token.
53
53
54
54
## Option 1: Using the /token endpoint
55
55
56
-
You can call the `/token` endpoint for any video that is marked private to get a signed URL token which expires in one hour:
56
+
You can call the `/token` endpoint for any video that is marked private to get a signed URL token which expires in one hour. This method does not support [Live WebRTC](/stream/webrtc-beta/).
57
57
58
58
```bash
59
59
curl --request POST \
@@ -168,9 +168,9 @@ export default {
168
168
};
169
169
```
170
170
171
-
## Option 2: Generating signed tokens without calling the `/token` endpoint
171
+
## Option 2: Using a signing key to create signed tokens
172
172
173
-
If you are generating a high-volume of tokens, it is best to generate new tokens without needing to call the Stream API each time.
173
+
If you are generating a high-volume of tokens, using [Live WebRTC](/stream/webrtc-beta/), or need to customize the access rules, generate new tokens using a signing key so you do not need to call the Stream API each time.
174
174
175
175
### Step 1: Call the `/stream/key` endpoint _once_ to obtain a key
0 commit comments