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
|`STREAM_PROFILE_PATH`| Path to store stream profile configurations. |
233
+
|`STREAM_PROFILE_POLICY`| Policy configuration for stream profiles. Default is 'Anyone' See [Stream Profile Policy](#stream-profile-policy). |
234
+
|`WEBHOOK_URL`| URL for webhook backend used for authentication and logging. see [Webhook - Authentication and Logging](#webhook---authentication-and-logging). |
|`STUN_SERVERS`| List of public STUN servers separated by `\|`. |
268
+
|`STUN_SERVERS_INTERNAL`| List of internal STUN servers used by the backend in case it has trouble connecting to the public STUN server. Separated by `\|`. |
269
+
|`TURN_SERVERS`| List of public TURN servers separated by `\|`. |
270
+
|`TURN_SERVERS_INTERNAL`| List of internal TURN servers used by the backend in case it has trouble connecting to the public TURN server. Separated by `\|`. |
271
+
|`TURN_SERVER_AUTH_SECRET`| Shared secret for TURN server authentication. |
|`ANYONE_WITH_RESERVED`| If Stream keys are reserved in advance, only a valid token can be used with them. If not reserved, anyone can used the streamkey |
300
+
|`RESERVED`| Only users with a valid token **and** a reserved stream key are allowed to stream. This is the most restrictive mode. |
301
+
302
+
## Webhook - Authentication and Logging
241
303
242
304
To prevent random users from streaming to your server, you can set the `WEBHOOK_URL` and validate/process requests in your code. This enables you to separate the authorization between broadcasting (whip) and watching (whep). So you can safely share a watch link without exposing the key used for broadcasting.
243
305
244
-
If the request succeeds (meaning the stream key is accepted), broadcast-box redirects the stream to an url given by the external server, otherwise the streaming request is dropped.
306
+
If the request succeeds (meaning the stream key is accepted), broadcast-box redirects the stream to an url given
307
+
by the external server, otherwise the streaming request is dropped.
245
308
246
309
See [here](examples/webhook-server.go). For an example Webhook Server that only allows the stream `broadcastBoxRulez`
247
310
@@ -285,11 +348,14 @@ If you wish to disable the test set the environment variable `NETWORK_TEST_ON_ST
285
348
286
349
## Design
287
350
288
-
The backend exposes three endpoints (the status page is optional, if hosting locally).
351
+
The backend exposes the following endpoints to support WebRTC streaming and server-side monitoring:
289
352
290
-
-`/api/whip` - Start a WHIP Session. WHIP broadcasts video via WebRTC.
291
-
-`/api/whep` - Start a WHEP Session. WHEP is video playback via WebRTC.
292
-
-`/api/status` - Status of the all active WHIP streams
0 commit comments