@@ -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