mirror of
https://gitee.com/xia-chu/ZLMediaKit.git
synced 2026-05-06 10:57:50 +08:00
新增deleteSnapDirectory删除截图接口
This commit is contained in:
parent
88ef00e429
commit
b1e1a0f174
@ -310,6 +310,53 @@
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "删除截图(deleteSnapDirectory)",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"url": {
|
||||
"raw": "{{ZLMediaKit_URL}}/index/api/deleteSnapDirectory?secret={{ZLMediaKit_secret}}&vhost={{defaultVhost}}&app=live&stream=test&file=71_1740828613.jpg",
|
||||
"host": [
|
||||
"{{ZLMediaKit_URL}}"
|
||||
],
|
||||
"path": [
|
||||
"index",
|
||||
"api",
|
||||
"deleteSnapDirectory"
|
||||
],
|
||||
"query": [
|
||||
{
|
||||
"key": "secret",
|
||||
"value": "{{ZLMediaKit_secret}}",
|
||||
"description": "api操作密钥(配置文件配置)"
|
||||
},
|
||||
{
|
||||
"key": "vhost",
|
||||
"value": "{{defaultVhost}}",
|
||||
"description": "筛选虚拟主机,例如__defaultVhost__"
|
||||
},
|
||||
{
|
||||
"key": "app",
|
||||
"value": "live",
|
||||
"description": "筛选应用名,例如 live"
|
||||
},
|
||||
{
|
||||
"key": "stream",
|
||||
"value": "test",
|
||||
"description": "筛选流id,例如 test"
|
||||
},
|
||||
{
|
||||
"key": "file",
|
||||
"value": "",
|
||||
"disabled": true,
|
||||
"description": "文件名,非必选"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "关断单个流(close_stream)",
|
||||
"request": {
|
||||
@ -522,7 +569,7 @@
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "添加rtsp/rtmp/hls/srt拉流代理(addStreamProxy)",
|
||||
"name": "添加拉流代理(addStreamProxy)",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
@ -560,7 +607,7 @@
|
||||
{
|
||||
"key": "url",
|
||||
"value": "rtmp://live.hkstv.hk.lxdns.com/live/hks2",
|
||||
"description": "拉流地址,例如rtmp://live.hkstv.hk.lxdns.com/live/hks2"
|
||||
"description": "拉流地址,支持rtsp/rtmp/hls/srt/http-flv/http-ts协议"
|
||||
},
|
||||
{
|
||||
"key": "rtp_type",
|
||||
|
||||
@ -1927,6 +1927,15 @@ void installWebApi() {
|
||||
File::deleteEmptyDir(record_path);
|
||||
});
|
||||
|
||||
api_regist("/index/api/deleteSnapDirectory", [](API_ARGS_MAP) {
|
||||
CHECK_SECRET();
|
||||
CHECK_ARGS("vhost", "app", "stream");
|
||||
GET_CONFIG(std::string, root, API::kSnapRoot);
|
||||
auto path = File::absolutePath(allArgs["vhost"] + "/" + allArgs["app"] + "/" + allArgs["stream"] + "/" + allArgs["file"], root);
|
||||
InfoL << "delete " << path;
|
||||
File::delete_file(path, true);
|
||||
});
|
||||
|
||||
// 获取录像文件夹列表或mp4文件列表 [AUTO-TRANSLATED:f7e299bc]
|
||||
// Get the list of recording folders or mp4 files
|
||||
//http://127.0.0.1/index/api/getMP4RecordFile?vhost=__defaultVhost__&app=live&stream=ss&period=2020-01
|
||||
|
||||
Loading…
Reference in New Issue
Block a user