[+] 设备录像状态

This commit is contained in:
acgist
2023-06-11 09:06:33 +08:00
parent 0908996fb0
commit b19579a666
11 changed files with 71 additions and 18 deletions

View File

@@ -76,6 +76,9 @@ export default {
this.audio = this.$refs.audio;
this.video = this.$refs.video;
this.client.proxy = this;
const status = this.taoyao.clientStatus(this.client.clientId);
this.clientRecord = status.clientRecording;
this.serverRecord = status.serverRecording;
},
props: {
"client": {

View File

@@ -74,6 +74,9 @@ export default {
this.audio = this.$refs.audio;
this.video = this.$refs.video;
this.client.proxy = this;
const status = this.taoyao.clientStatus(this.client.clientId);
this.clientRecord = status.clientRecording;
this.serverRecord = status.serverRecording;
},
props: {
"client": {

View File

@@ -403,12 +403,16 @@ class RemoteClient {
audioTrack;
// 视频Track
videoTrack;
// 终端录制状态
clientRecording;
// 服务端录制状态
serverRecording;
constructor({
name,
clientId,
}) {
this.name = name;
this.name = name;
this.clientId = clientId;
}
@@ -1761,9 +1765,16 @@ class Taoyao extends RemoteClient {
);
return response.body;
}
async clientList() {
async clientStatus(clientId) {
const response = await this.request(
protocol.buildMessage("client::list", { roomId: self.roomId })
protocol.buildMessage("client::list", { clientId })
);
return response.body;
}
async roomClientList() {
const me = this;
const response = await this.request(
protocol.buildMessage("room::client::list", { roomId: me.roomId })
);
return response.body;
}