[*] 日常优化

This commit is contained in:
acgist
2023-08-31 07:32:52 +08:00
parent 96e50a22db
commit 4cd1e5b08d
4 changed files with 31 additions and 20 deletions

View File

@@ -721,8 +721,11 @@ class Taoyao extends RemoteClient {
*/
async on(message) {
const me = this;
const { header, body } = message;
const { id } = header;
const { code, header, body } = message;
const { id, signal } = header;
if(code !== "0000") {
console.warn("信令错误", message);
}
// 请求回调
if (me.callbackMapping.has(id)) {
try {
@@ -2262,19 +2265,6 @@ class Taoyao extends RemoteClient {
}));
}
/**
* @param {*} clientId 终端ID
*
* @returns 终端所有ID
*/
async roomClientListId(clientId) {
const response = await this.request(protocol.buildMessage("room::client::list::id", {
roomId : this.roomId,
clientId: clientId
}));
return response.body;
}
/**
* 媒体回调
*
@@ -2818,6 +2808,21 @@ class Taoyao extends RemoteClient {
}
}
/**
* 房间终端ID集合信令
*
* @param {*} clientId 终端ID
*
* @returns 房间终端ID集合
*/
async roomClientListId(clientId) {
const response = await this.request(protocol.buildMessage("room::client::list::id", {
roomId : this.roomId,
clientId: clientId
}));
return response.body;
}
/**
* 房间终端列表信令
*