[*] 日常优化

This commit is contained in:
acgist
2023-07-28 08:11:59 +08:00
parent c9af50a324
commit 82731876f2
11 changed files with 133 additions and 99 deletions

View File

@@ -1048,6 +1048,38 @@ class Taoyao extends RemoteClient {
me.push(protocol.buildMessage("client::close", {}));
}
/**
* @returns 媒体服务列表
*/
async mediaList() {
const response = await this.request(protocol.buildMessage("client::list", {
clientType: "MEDIA"
}));
return response.body;
}
/**
* @returns 媒体终端列表
*/
async mediaClientList() {
const response = await this.request(protocol.buildMessage("client::list", {}));
return response.body.filter(v => {
return v.clientType === "WEB" || v.clientType === "CAMERA" || v.clientType === "MOBILE";
});
}
/**
* @param {*} clientType 终端类型(默认所有)
*
* @returns 终端列表
*/
async clientList(clientType) {
const response = await this.request(protocol.buildMessage("client::list", {
clientType
}));
return response.body;
}
/**
* 终端配置信令
*
@@ -2090,28 +2122,6 @@ class Taoyao extends RemoteClient {
return response.body;
}
/**
* @returns 媒体服务列表
*/
async mediaList() {
const response = await this.request(protocol.buildMessage("client::list", {
clientType: "MEDIA"
}));
return response.body;
}
/**
* @param {*} clientType 终端类型(默认所有)
*
* @returns 终端列表
*/
async clientList(clientType) {
const response = await this.request(protocol.buildMessage("client::list", {
clientType
}));
return response.body;
}
/**
* @param {*} clientId 终端ID
*