mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-06 19:58:10 +08:00
Updated MediaServer支持的HTTP HOOK API (markdown)
@@ -20,6 +20,7 @@ on_stream_none_reader=https://127.0.0.1/index/hook/on_stream_none_reader
|
||||
on_stream_not_found=https://127.0.0.1/index/hook/on_stream_not_found
|
||||
on_server_started=https://127.0.0.1/index/hook/on_server_started
|
||||
on_server_keepalive=https://127.0.0.1/index/hook/on_server_keepalive
|
||||
on_rtp_server_timeout=https://127.0.0.1/index/hook/on_rtp_server_timeout
|
||||
```
|
||||
|
||||
如果是鉴权事件,且访问IP是`127.0.0.1`或者鉴权url参数与`admin_params`一致,那么会直接鉴权成功(不会触发鉴权web hook)。
|
||||
@@ -1079,7 +1080,44 @@ on_server_keepalive=https://127.0.0.1/index/hook/on_server_keepalive
|
||||
"mediaServerId" : "192.168.255.10"
|
||||
}
|
||||
```
|
||||
### 17、on_rtp_server_timeout
|
||||
|
||||
- 解释:
|
||||
|
||||
调用openRtpServer 接口,rtp server 长时间未收到数据,执行此web hook,对回复不敏感
|
||||
|
||||
- 触发请求
|
||||
|
||||
```http
|
||||
POST /index/hook/on_rtp_server_timeout HTTP/1.1
|
||||
Accept: */*
|
||||
Accept-Language: zh-CN,zh;q=0.8
|
||||
Connection: keep-alive
|
||||
Content-Length: 189
|
||||
Content-Type: application/json
|
||||
Host: 127.0.0.1
|
||||
Tools: ZLMediaKit
|
||||
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36
|
||||
|
||||
{
|
||||
"local_port" : 0,
|
||||
"re_use_port" : true,
|
||||
"ssrc" : 0,
|
||||
"stream_id" : "test",
|
||||
"tcp_mode" : 0,
|
||||
"mediaServerId" : "192.168.255.10"
|
||||
}
|
||||
- 请求参数详解:
|
||||
|
||||
| 参数名 | 参数类型 | 参数解释 |
|
||||
| :------: | :--------------: | :--------------------------: |
|
||||
| `local_port` | `int` | openRtpServer 输入的参数 |
|
||||
| `re_use_port` | `bool` | openRtpServer 输入的参数 |
|
||||
| `ssrc` | `uint32` | openRtpServer 输入的参数 |
|
||||
| `stream_id` | `string` | openRtpServer 输入的参数 |
|
||||
| `tcp_mode` | `int` | openRtpServer 输入的参数 |
|
||||
| `mediaServerId` | `string` | 服务器id,通过配置文件设置 |
|
||||
```
|
||||
> qq群号: 690854210
|
||||
|
||||
|
||||
Reference in New Issue
Block a user