mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
support multiple http hooks for a event.
This commit is contained in:
parent
260bde69d9
commit
30099dfa09
5 changed files with 2003 additions and 1990 deletions
|
@ -87,12 +87,14 @@ vhost dev {
|
|||
hls_window 30;
|
||||
#forward 127.0.0.1:19350;
|
||||
#forward 127.0.0.1:1936;
|
||||
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;
|
||||
on_play http://127.0.0.1:8085/api/v1/sessions;
|
||||
on_stop http://127.0.0.1:8085/api/v1/sessions;
|
||||
http_hooks {
|
||||
on_connect http://127.0.0.1:8085/api/v1/clients http://localhost: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;
|
||||
on_play http://127.0.0.1:8085/api/v1/sessions;
|
||||
on_stop http://127.0.0.1:8085/api/v1/sessions;
|
||||
}
|
||||
transcode {
|
||||
enabled off;
|
||||
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
||||
|
@ -133,16 +135,20 @@ vhost dev {
|
|||
}
|
||||
# the http hook callback vhost, srs will invoke the hooks for specified events.
|
||||
vhost hooks.callback.vhost.com {
|
||||
# when client connect to vhost/app, call the hook,
|
||||
# the request in the POST data string is a object encode by json:
|
||||
# {
|
||||
# "ip": "192.168.1.10", "vhost": "video.test.com", "app": "live",
|
||||
# "pageUrl": "http://www.test.com/live.html"
|
||||
# }
|
||||
# if valid, the hook must return HTTP code 200(Stauts OK) and response
|
||||
# an int value specifies the error code(0 corresponding to success):
|
||||
# 0
|
||||
on_connect http://127.0.0.1:8085/api/v1/clients;
|
||||
http_hooks {
|
||||
# when client connect to vhost/app, call the hook,
|
||||
# the request in the POST data string is a object encode by json:
|
||||
# {
|
||||
# "ip": "192.168.1.10", "vhost": "video.test.com", "app": "live",
|
||||
# "pageUrl": "http://www.test.com/live.html"
|
||||
# }
|
||||
# if valid, the hook must return HTTP code 200(Stauts OK) and response
|
||||
# an int value specifies the error code(0 corresponding to success):
|
||||
# 0
|
||||
# support multiple api hooks, format:
|
||||
# on_connect http://xxx/api0 http://xxx/api1 http://xxx/apiN
|
||||
on_connect http://127.0.0.1:8085/api/v1/clients http://localhost:8085/api/v1/clients;
|
||||
}
|
||||
}
|
||||
# the mirror filter of ffmpeg, @see: http://ffmpeg.org/ffmpeg-filters.html#Filtering-Introduction
|
||||
vhost mirror.transcode.vhost.com {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue