From 71efe8300a5d68979aecb49011b7b21b63bcd14e Mon Sep 17 00:00:00 2001 From: acgist <289547414@qq.com> Date: Tue, 17 Oct 2023 07:39:04 +0800 Subject: [PATCH] =?UTF-8?q?[*]=20=E6=97=A5=E5=B8=B8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- taoyao-client-web/src/components/Taoyao.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/taoyao-client-web/src/components/Taoyao.js b/taoyao-client-web/src/components/Taoyao.js index d48fde1..fbf32d3 100644 --- a/taoyao-client-web/src/components/Taoyao.js +++ b/taoyao-client-web/src/components/Taoyao.js @@ -1341,7 +1341,7 @@ class Taoyao extends RemoteClient { /** * 响铃信令 * - * @param {*} clientId 目标终端ID + * @param {*} clientId 终端ID * @param {*} enabled 是否响铃 */ controlBell(clientId, enabled) { @@ -1354,6 +1354,8 @@ class Taoyao extends RemoteClient { /** * 响铃信令 * + * 注意:自己实现本地响铃 + * * @param {*} message 信令消息 * @param {*} body 消息主体 */ @@ -1369,23 +1371,23 @@ class Taoyao extends RemoteClient { * @param {*} enabled 录制状态 */ controlClientRecord(clientId, enabled) { - const me = this; - me.request(protocol.buildMessage("control::client::record", { - to : clientId, - enabled: enabled + this.request(protocol.buildMessage("control::client::record", { + enabled, + to: clientId, })); } /** * 终端录像信令 * + * 注意:自己实现本地录像(localClientRecord) + * * @param {*} message 信令消息 * @param {*} body 消息主体 */ defaultControlClientReccord(message, body) { - console.debug("终端录像", message); + console.debug("录像", message); this.push(message); - // TODO:录像 } /** @@ -1476,6 +1478,8 @@ class Taoyao extends RemoteClient { /** * 拍照信令 * + * 注意:自己实现本地拍照(localPhotograph) + * * @param {*} message 信令消息 * @param {*} body 消息主体 */ @@ -1501,7 +1505,7 @@ class Taoyao extends RemoteClient { /** * 终端唤醒信令 * - * @param {*} clientId 目标终端ID + * @param {*} clientId 终端ID */ async controlWakeup(clientId) { if(clientId === this.clientId) { @@ -3564,7 +3568,7 @@ class Taoyao extends RemoteClient { peerConnection.restartIce(); } } - const localStream = await this.getStream({ + const localStream = await this.getStream({ audioEnabled: true, videoEnabled: true, });