[*] 日常优化
This commit is contained in:
@@ -164,7 +164,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async loadList() {
|
async loadList() {
|
||||||
this.rooms = await this.taoyao.roomList();
|
this.rooms = await this.taoyao.roomList();
|
||||||
this.medias = await this.taoyao.mediaList();
|
this.medias = await this.taoyao.mediaServerList();
|
||||||
this.clients = await this.taoyao.mediaClientList();
|
this.clients = await this.taoyao.mediaClientList();
|
||||||
},
|
},
|
||||||
async sessionCall() {
|
async sessionCall() {
|
||||||
|
|||||||
@@ -1230,11 +1230,14 @@ class Taoyao extends RemoteClient {
|
|||||||
/**
|
/**
|
||||||
* @returns 媒体服务列表
|
* @returns 媒体服务列表
|
||||||
*/
|
*/
|
||||||
async mediaList() {
|
async mediaServerList() {
|
||||||
const response = await this.request(protocol.buildMessage("client::list", {
|
const response = await this.request(protocol.buildMessage("client::list", {
|
||||||
clientType: "MEDIA"
|
clientType: "MEDIA"
|
||||||
}));
|
}));
|
||||||
return response.body;
|
const {
|
||||||
|
body
|
||||||
|
} = response;
|
||||||
|
return body || [];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1242,7 +1245,10 @@ class Taoyao extends RemoteClient {
|
|||||||
*/
|
*/
|
||||||
async mediaClientList() {
|
async mediaClientList() {
|
||||||
const response = await this.request(protocol.buildMessage("client::list", {}));
|
const response = await this.request(protocol.buildMessage("client::list", {}));
|
||||||
return response.body.filter(v => {
|
const {
|
||||||
|
body
|
||||||
|
} = response;
|
||||||
|
return (body || []).filter(v => {
|
||||||
return v.clientType === "WEB" || v.clientType === "CAMERA" || v.clientType === "MOBILE";
|
return v.clientType === "WEB" || v.clientType === "CAMERA" || v.clientType === "MOBILE";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user