From f151f6852292ddfc569bd6eacfe94dfa893a80bb Mon Sep 17 00:00:00 2001 From: yujiaxinwt <1157613664@qq.com> Date: Tue, 25 Jul 2023 17:10:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=9D=99=E9=9F=B3?= =?UTF-8?q?=E5=8F=82=E6=95=B0is=5Fmute?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sdk/demo/demo.html | 1 + sdk/index.html | 1 + sdk/src/CloudApp.js | 8 ++++++++ 3 files changed, 10 insertions(+) diff --git a/sdk/demo/demo.html b/sdk/demo/demo.html index a4839e4..ae80ccd 100644 --- a/sdk/demo/demo.html +++ b/sdk/demo/demo.html @@ -374,6 +374,7 @@ Copyright 2022 Huawei Cloud Computing Technology Co., Ltd. decoder_type: 'H264', // H265\H264 microPhoneOutputType: 'OPUS', // PCM或OPUS media_config: { + is_mute: 0, // 取值0或1(0有声,1是无声) bitrate: 3000000, // [100000, 1000000] fps: 10 // [10, 60] 10的整数倍 } diff --git a/sdk/index.html b/sdk/index.html index 365cf6d..5dfa57e 100644 --- a/sdk/index.html +++ b/sdk/index.html @@ -374,6 +374,7 @@ Copyright 2022 Huawei Cloud Computing Technology Co., Ltd. decoder_type: 'H264', // H265\H264 microPhoneOutputType: 'OPUS', // PCM或OPUS media_config: { + is_mute: 0, // 取值0或1(0有声,1是无声) bitrate: 3000000, // [100000, 1000000] fps: 10 // [10, 60] 10的整数倍 } diff --git a/sdk/src/CloudApp.js b/sdk/src/CloudApp.js index 2438e5c..96f2fea 100644 --- a/sdk/src/CloudApp.js +++ b/sdk/src/CloudApp.js @@ -226,6 +226,10 @@ class CloudApp { } let schema = { + is_mute: [{ + type: 'number', + valueMap: [0,1] + }], fps: [{ type: 'number', min: 10, @@ -282,6 +286,10 @@ class CloudApp { return `${name} should be smaller than ${rule.max}.`; } + if (rule.valueMap !== undefined && !rule.valueMap.includes(numberVal)) { + return `${name} must be 0 or 1.`; + } + break; } -- Gitee From 8f6bb9bd97f0d16088ddea012987a03f28757839 Mon Sep 17 00:00:00 2001 From: yujiaxinwt <1157613664@qq.com> Date: Tue, 25 Jul 2023 17:50:14 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=EF=BC=9B=E9=BB=98=E8=AE=A4=E4=B8=8D=E5=8F=91?= =?UTF-8?q?=E9=80=81=E8=AF=A5=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sdk/demo/demo.html | 1 - sdk/index.html | 1 - sdk/src/CloudApp.js | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/sdk/demo/demo.html b/sdk/demo/demo.html index ae80ccd..a4839e4 100644 --- a/sdk/demo/demo.html +++ b/sdk/demo/demo.html @@ -374,7 +374,6 @@ Copyright 2022 Huawei Cloud Computing Technology Co., Ltd. decoder_type: 'H264', // H265\H264 microPhoneOutputType: 'OPUS', // PCM或OPUS media_config: { - is_mute: 0, // 取值0或1(0有声,1是无声) bitrate: 3000000, // [100000, 1000000] fps: 10 // [10, 60] 10的整数倍 } diff --git a/sdk/index.html b/sdk/index.html index 5dfa57e..365cf6d 100644 --- a/sdk/index.html +++ b/sdk/index.html @@ -374,7 +374,6 @@ Copyright 2022 Huawei Cloud Computing Technology Co., Ltd. decoder_type: 'H264', // H265\H264 microPhoneOutputType: 'OPUS', // PCM或OPUS media_config: { - is_mute: 0, // 取值0或1(0有声,1是无声) bitrate: 3000000, // [100000, 1000000] fps: 10 // [10, 60] 10的整数倍 } diff --git a/sdk/src/CloudApp.js b/sdk/src/CloudApp.js index 96f2fea..bddaaa6 100644 --- a/sdk/src/CloudApp.js +++ b/sdk/src/CloudApp.js @@ -226,7 +226,7 @@ class CloudApp { } let schema = { - is_mute: [{ + mute: [{ type: 'number', valueMap: [0,1] }], -- Gitee