mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
support http hooks: on_connect/close/publish/unpublish/play/stop.
This commit is contained in:
parent
889ad9238b
commit
3fd3ac5a11
2 changed files with 35 additions and 1 deletions
|
@ -88,7 +88,8 @@ vhost dev {
|
|||
#forward 127.0.0.1:19350;
|
||||
#forward 127.0.0.1:1936;
|
||||
http_hooks {
|
||||
on_connect http://127.0.0.1:8085/api/v1/clients http://localhost:8085/api/v1/clients;
|
||||
enabled on;
|
||||
on_connect http://127.0.0.1:8085/api/v1/clients;
|
||||
on_close http://127.0.0.1:8085/api/v1/clients;
|
||||
on_publish http://127.0.0.1:8085/api/v1/streams;
|
||||
on_unpublish http://127.0.0.1:8085/api/v1/streams;
|
||||
|
@ -136,6 +137,9 @@ vhost dev {
|
|||
# the http hook callback vhost, srs will invoke the hooks for specified events.
|
||||
vhost hooks.callback.vhost.com {
|
||||
http_hooks {
|
||||
# whether the http hooks enalbe.
|
||||
# default off.
|
||||
enabled on;
|
||||
# when client connect to vhost/app, call the hook,
|
||||
# the request in the POST data string is a object encode by json:
|
||||
# {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue