[*] 日常优化
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 房间终端列表信令
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user