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
SRS supports a short streamid format without the `#!::` prefix for simpler URLs. When using short streamid format like `live/livestream` or just `livestream`, SRS uses the `default_mode` configuration to determine whether it's a publish or play request.
359
+
360
+
The `default_mode` configuration accepts two values:
361
+
*`publish`: Short streamid will be treated as publish/push mode.
362
+
*`request`: Short streamid will be treated as request/play/pull mode (this is the default).
363
+
364
+
For publisher-friendly setup where clients can push with simple URLs, configure `default_mode` to `publish`:
365
+
366
+
```bash
367
+
srt_server {
368
+
enabled on;
369
+
listen 10080;
370
+
# Short streamid format will be treated as publisher
371
+
default_mode publish;
372
+
}
373
+
```
374
+
375
+
With this configuration, you can publish with a simple URL:
376
+
377
+
```bash
378
+
# Publish with short streamid (uses default_mode=publish)
SRS provides two ready-to-use configuration files:
409
+
*`conf/srt.shortstreamid.publish.conf`: For publisher-friendly setup with `default_mode publish`.
410
+
*`conf/srt.shortstreamid.play.conf`: For player-friendly setup with `default_mode request`.
411
+
412
+
Note that explicit mode specification with the full `#!::` prefix always takes precedence over `default_mode`. This allows clients that support full streamid format to override the default behavior.
413
+
339
414
## Authentication
340
415
341
416
For the definition of SRT URLs, please refer to [SRT URL Schema](#srt-url).
for (int i = 0; conf && i < (int)conf->directives_.size(); i++) {
1937
1937
string n = conf->at(i)->name_;
1938
-
if (n != "enabled" && n != "listen" && n != "maxbw" && n != "mss" && n != "latency" && n != "recvlatency" && n != "peerlatency" && n != "connect_timeout" && n != "peer_idle_timeout" && n != "sendbuf" && n != "recvbuf" && n != "payloadsize" && n != "default_app" && n != "sei_filter" && n != "mix_correct" && n != "tlpktdrop" && n != "tsbpdmode" && n != "passphrase" && n != "pbkeylen" && n != "default_streamid") {
1938
+
if (n != "enabled" && n != "listen" && n != "maxbw" && n != "mss" && n != "latency" && n != "recvlatency" && n != "peerlatency" && n != "connect_timeout" && n != "peer_idle_timeout" && n != "sendbuf" && n != "recvbuf" && n != "payloadsize" && n != "default_app" && n != "sei_filter" && n != "mix_correct" && n != "tlpktdrop" && n != "tsbpdmode" && n != "passphrase" && n != "pbkeylen" && n != "default_streamid" && n != "default_mode") {
0 commit comments