add getMediaPlayerList

夏楚
2023-08-24 17:06:41 +08:00
parent a02f0f1763
commit c6d0addb22

@@ -42,7 +42,8 @@ MediaServer是ZLMediaKit的主进程目前支持以下http api接口这些
"/index/api/getStatistic",
"/index/api/addStreamPusherProxy",
"/index/api/delStreamPusherProxy",
"/index/api/version"
"/index/api/version",
"/index/api/getMediaPlayerList"
```
其中POST方式参数既可以使用urlencoded方式也可以使用json方式。
@@ -1266,3 +1267,40 @@ typedef enum {
}
}
```
### 33、`/index/api/getMediaPlayerList`
- 功能:获取某个流观看者列表
- 范例:[http://127.0.0.1:8080/index/api/getMediaPlayerList?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&schema=rtsp&vhost=__defaultVhost__&app=live&stream=test'](http://127.0.0.1:8080/index/api/getMediaPlayerList?secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc&schema=rtsp&vhost=__defaultVhost__&app=live&stream=test')
- 参数:
| 参数 | 是否必选 | 释意 |
| :----: | :------: | :----------------------------------------------------------: |
| secret | Y | api操作密钥(配置文件配置)如果操作ip是127.0.0.1,则不需要此参数 |
| schema | Y | 协议,例如 rtsp或rtmp |
| vhost | Y | 虚拟主机,例如`__defaultVhost__` |
| app | Y | 应用名,例如 live |
| stream | Y | 流id例如 obs |
- 响应:
```json
{
"code": 0,
"data": [
{
"identifier": "3-309",
"local_ip": "::",
"local_port": 8000,
"peer_ip": "172.18.190.159",
"peer_port": 52996,
"typeid": "mediakit::WebRtcSession"
}
]
}
```