mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
DVR: Support blackbox test based on hooks. v5.0.132 (#3365)
This commit is contained in:
parent
a27ce1d50f
commit
e655948e96
31 changed files with 4704 additions and 3925 deletions
|
@ -1515,6 +1515,7 @@ vhost http.remux.srs.com {
|
|||
vhost hooks.callback.srs.com {
|
||||
http_hooks {
|
||||
# whether the http hooks enable.
|
||||
# Overwrite by env SRS_VHOST_HTTP_HOOKS_ENABLED for all vhosts.
|
||||
# default off.
|
||||
enabled on;
|
||||
# when client(encoder) publish to vhost/app/stream, call the hook,
|
||||
|
@ -1533,6 +1534,7 @@ vhost hooks.callback.srs.com {
|
|||
# on_publish http://xxx/api0 http://xxx/api1 http://xxx/apiN
|
||||
# @remark For SRS4, the HTTPS url is supported, for example:
|
||||
# on_publish https://xxx/api0 https://xxx/api1 https://xxx/apiN
|
||||
# Overwrite by env SRS_VHOST_HTTP_HOOKS_ON_PUBLISH for all vhosts.
|
||||
on_publish http://127.0.0.1:8085/api/v1/streams http://localhost:8085/api/v1/streams;
|
||||
# when client(encoder) stop publish to vhost/app/stream, call the hook,
|
||||
# the request in the POST data string is a object encode by json:
|
||||
|
@ -1550,6 +1552,7 @@ vhost hooks.callback.srs.com {
|
|||
# on_unpublish http://xxx/api0 http://xxx/api1 http://xxx/apiN
|
||||
# @remark For SRS4, the HTTPS url is supported, for example:
|
||||
# on_unpublish https://xxx/api0 https://xxx/api1 https://xxx/apiN
|
||||
# Overwrite by env SRS_VHOST_HTTP_HOOKS_ON_UNPUBLISH for all vhosts.
|
||||
on_unpublish http://127.0.0.1:8085/api/v1/streams http://localhost:8085/api/v1/streams;
|
||||
# when client start to play vhost/app/stream, call the hook,
|
||||
# the request in the POST data string is a object encode by json:
|
||||
|
@ -1568,6 +1571,7 @@ vhost hooks.callback.srs.com {
|
|||
# on_play http://xxx/api0 http://xxx/api1 http://xxx/apiN
|
||||
# @remark For SRS4, the HTTPS url is supported, for example:
|
||||
# on_play https://xxx/api0 https://xxx/api1 https://xxx/apiN
|
||||
# Overwrite by env SRS_VHOST_HTTP_HOOKS_ON_PLAY for all vhosts.
|
||||
on_play http://127.0.0.1:8085/api/v1/sessions http://localhost:8085/api/v1/sessions;
|
||||
# when client stop to play vhost/app/stream, call the hook,
|
||||
# the request in the POST data string is a object encode by json:
|
||||
|
@ -1585,6 +1589,7 @@ vhost hooks.callback.srs.com {
|
|||
# on_stop http://xxx/api0 http://xxx/api1 http://xxx/apiN
|
||||
# @remark For SRS4, the HTTPS url is supported, for example:
|
||||
# on_stop https://xxx/api0 https://xxx/api1 https://xxx/apiN
|
||||
# Overwrite by env SRS_VHOST_HTTP_HOOKS_ON_STOP for all vhosts.
|
||||
on_stop http://127.0.0.1:8085/api/v1/sessions http://localhost:8085/api/v1/sessions;
|
||||
# when srs reap a dvr file, call the hook,
|
||||
# the request in the POST data string is a object encode by json:
|
||||
|
@ -1600,6 +1605,7 @@ vhost hooks.callback.srs.com {
|
|||
# if valid, the hook must return HTTP code 200(Status OK) and response
|
||||
# an int value specifies the error code(0 corresponding to success):
|
||||
# 0
|
||||
# Overwrite by env SRS_VHOST_HTTP_HOOKS_ON_DVR for all vhosts.
|
||||
on_dvr http://127.0.0.1:8085/api/v1/dvrs http://localhost:8085/api/v1/dvrs;
|
||||
# when srs reap a ts file of hls, call the hook,
|
||||
# the request in the POST data string is a object encode by json:
|
||||
|
@ -1620,6 +1626,7 @@ vhost hooks.callback.srs.com {
|
|||
# if valid, the hook must return HTTP code 200(Status OK) and response
|
||||
# an int value specifies the error code(0 corresponding to success):
|
||||
# 0
|
||||
# Overwrite by env SRS_VHOST_HTTP_HOOKS_ON_HLS for all vhosts.
|
||||
on_hls http://127.0.0.1:8085/api/v1/hls http://localhost:8085/api/v1/hls;
|
||||
# when srs reap a ts file of hls, call this hook,
|
||||
# used to push file to cdn network, by get the ts file from cdn network.
|
||||
|
@ -1631,6 +1638,7 @@ vhost hooks.callback.srs.com {
|
|||
# [ts_url], replace with the ts url.
|
||||
# ignore any return data of server.
|
||||
# @remark random select a url to report, not report all.
|
||||
# Overwrite by env SRS_VHOST_HTTP_HOOKS_ON_HLS_NOTIFY for all vhosts.
|
||||
on_hls_notify http://127.0.0.1:8085/api/v1/hls/[server_id]/[app]/[stream]/[ts_url][param];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue