mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
For #1110, Support params in http callback. 3.0.36
This commit is contained in:
parent
68a1656e07
commit
29b74c7220
5 changed files with 25 additions and 15 deletions
|
@ -851,7 +851,7 @@ vhost hooks.callback.srs.com {
|
|||
# "action": "on_unpublish",
|
||||
# "client_id": 1985,
|
||||
# "ip": "192.168.1.10", "vhost": "video.test.com", "app": "live",
|
||||
# "stream": "livestream"
|
||||
# "stream": "livestream", "param":"?token=xxx&salt=yyy"
|
||||
# }
|
||||
# if valid, the hook must return HTTP code 200(Status OK) and response
|
||||
# an int value specifies the error code(0 corresponding to success):
|
||||
|
@ -865,7 +865,7 @@ vhost hooks.callback.srs.com {
|
|||
# "action": "on_play",
|
||||
# "client_id": 1985,
|
||||
# "ip": "192.168.1.10", "vhost": "video.test.com", "app": "live",
|
||||
# "stream": "livestream",
|
||||
# "stream": "livestream", "param":"?token=xxx&salt=yyy",
|
||||
# "pageUrl": "http://www.test.com/live.html"
|
||||
# }
|
||||
# if valid, the hook must return HTTP code 200(Status OK) and response
|
||||
|
@ -880,7 +880,7 @@ vhost hooks.callback.srs.com {
|
|||
# "action": "on_stop",
|
||||
# "client_id": 1985,
|
||||
# "ip": "192.168.1.10", "vhost": "video.test.com", "app": "live",
|
||||
# "stream": "livestream"
|
||||
# "stream": "livestream", "param":"?token=xxx&salt=yyy"
|
||||
# }
|
||||
# if valid, the hook must return HTTP code 200(Status OK) and response
|
||||
# an int value specifies the error code(0 corresponding to success):
|
||||
|
@ -894,7 +894,7 @@ vhost hooks.callback.srs.com {
|
|||
# "action": "on_dvr",
|
||||
# "client_id": 1985,
|
||||
# "ip": "192.168.1.10", "vhost": "video.test.com", "app": "live",
|
||||
# "stream": "livestream",
|
||||
# "stream": "livestream", "param":"?token=xxx&salt=yyy",
|
||||
# "cwd": "/usr/local/srs",
|
||||
# "file": "./objs/nginx/html/live/livestream.1420254068776.flv"
|
||||
# }
|
||||
|
@ -908,7 +908,7 @@ vhost hooks.callback.srs.com {
|
|||
# "action": "on_hls",
|
||||
# "client_id": 1985,
|
||||
# "ip": "192.168.1.10", "vhost": "video.test.com", "app": "live",
|
||||
# "stream": "livestream",
|
||||
# "stream": "livestream", "param":"?token=xxx&salt=yyy",
|
||||
# "duration": 9.36, // in seconds
|
||||
# "cwd": "/usr/local/srs",
|
||||
# "file": "./objs/nginx/html/live/livestream/2015-04-23/01/476584165.ts",
|
||||
|
@ -926,10 +926,11 @@ vhost hooks.callback.srs.com {
|
|||
# so we use HTTP GET and use the variable following:
|
||||
# [app], replace with the app.
|
||||
# [stream], replace with the stream.
|
||||
# [param], replace with the param.
|
||||
# [ts_url], replace with the ts url.
|
||||
# ignore any return data of server.
|
||||
# @remark random select a url to report, not report all.
|
||||
on_hls_notify http://127.0.0.1:8085/api/v1/hls/[app]/[stream][ts_url];
|
||||
on_hls_notify http://127.0.0.1:8085/api/v1/hls/[app]/[stream]/[ts_url][param];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue