listStreamProxy与listStreamPusherProxy支持key筛选参数

This commit is contained in:
xia-chu
2026-03-18 11:23:22 +08:00
parent 22a8a9a2ec
commit fa7b0639d8
2 changed files with 17 additions and 9 deletions

View File

@@ -1243,19 +1243,19 @@ void installWebApi() {
});
api_regist("/index/api/listStreamPusherProxy", [](API_ARGS_MAP) {
CHECK_SECRET();
s_pusher_proxy.for_each([&val](const std::string& key, const PusherProxy::Ptr& p) {
s_pusher_proxy.for_each([&val](const std::string &key, const PusherProxy::Ptr &p) {
Json::Value item = ToJson(p);
item["key"] = key;
val["data"].append(item);
});
}, allArgs["key"]);
});
api_regist("/index/api/listStreamProxy", [](API_ARGS_MAP) {
CHECK_SECRET();
s_player_proxy.for_each([&val](const std::string& key, const PlayerProxy::Ptr& p) {
s_player_proxy.for_each([&val](const std::string &key, const PlayerProxy::Ptr &p) {
Json::Value item = ToJson(p);
item["key"] = key;
val["data"].append(item);
});
}, allArgs["key"]);
});
// 动态添加rtsp/rtmp拉流代理 [AUTO-TRANSLATED:2616537c]
// Dynamically add rtsp/rtmp pull stream proxy