Skip to content

Commit 66af013

Browse files
Forward: add backend comment in full.conf and update forward.backend.conf.
1 parent 45c27bb commit 66af013

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

trunk/conf/forward.backend.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
listen 1935;
66
max_connections 1000;
7-
pid ./objs/srs.master.pid;
7+
pid ./objs/srs.backend.pid;
88
daemon off;
99
srs_log_tank console;
1010
vhost __defaultVhost__ {

trunk/conf/full.conf

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -670,30 +670,32 @@ vhost same.vhost.forward.srs.com {
670670
# format: {ip}:{port} {ip_N}:{port_N}
671671
destination 127.0.0.1:1936 127.0.0.1:1937;
672672

673-
# when client(encoder) publish to vhost/app/stream, then create forwarder, call the hook,
673+
# when client(encoder) publish to vhost/app/stream, call the hook in creating backend forwarder.
674674
# the request in the POST data string is a object encode by json:
675675
# {
676676
# "action": "on_forward",
677677
# "server_id": "vid-k21d7y2",
678678
# "client_id": "9o7g1330",
679679
# "ip": "127.0.0.1",
680-
# "vhost": "video.test.com",
680+
# "vhost": "__defaultVhost__",
681681
# "app": "live",
682682
# "tcUrl": "rtmp://127.0.0.1:1935/live",
683683
# "stream": "livestream",
684-
# "param": "?forward=rtmp://ossrs.net/live/livestream"
684+
# "param": ""
685685
# }
686686
# if valid, the hook must return HTTP code 200(Status OK) and response
687687
# an int value specifies the error code(0 corresponding to success):
688688
# {
689689
# "code": 0,
690690
# "data": {
691691
# "urls":[
692-
# "rtmp://ossrs.net:1935/live/livestream?auth_token=xxx",
693-
# "rtmp://cdn.com:1935/live/livestream?auth_token=xxx"
692+
# "rtmp://127.0.0.1:19350/test/teststream"
694693
# ]
695694
# }
696695
# }
696+
# PS: you can transform params to backend service, such as:
697+
# { "param": "?forward=rtmp://127.0.0.1:19351/test/livestream" }
698+
# then backend return forward's url in response.
697699
# only support one api hook, format:
698700
# backend http://xxx/api0
699701
backend http://127.0.0.1:8085/api/v1/forward;

0 commit comments

Comments
 (0)