@lambo-design-mobile/lambo-js-bridge 1.0.0-beta.24 → 1.0.0-beta.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +9 -4
- package/demo/index.vue +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
|
+
## [1.0.0-beta.25](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/compare/@lambo-design-mobile/lambo-js-bridge@1.0.0-beta.24...@lambo-design-mobile/lambo-js-bridge@1.0.0-beta.25) (2025-03-10)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### ✨ Features | 新功能
|
|
6
|
+
|
|
7
|
+
* **@lambo-design-mobile/js-bridge:** 录音接口新增silenceDelay、silenceStopSeconds、volumeThreshold入参 ([e501510](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/commit/e5015100c715b07a677ca90dffd4228ae13bd659))
|
|
8
|
+
|
|
2
9
|
## [1.0.0-beta.24](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/compare/@lambo-design-mobile/lambo-js-bridge@1.0.0-beta.23...@lambo-design-mobile/lambo-js-bridge@1.0.0-beta.24) (2025-03-04)
|
|
3
10
|
|
|
4
11
|
|
package/README.md
CHANGED
|
@@ -350,7 +350,7 @@ method:{
|
|
|
350
350
|
this.recordingStatus = 'recording';
|
|
351
351
|
try {
|
|
352
352
|
// 传入 { auto: true } 表示启用自动录音
|
|
353
|
-
const result = await this.$lamboJsBridge.startRecording({ auto: true });
|
|
353
|
+
const result = await this.$lamboJsBridge.startRecording({ auto: true , silenceDelay: 1, silenceStopSeconds: 2, volumeThreshold: 60});
|
|
354
354
|
console.log("自动录音开始成功:", result);
|
|
355
355
|
} catch (error) {
|
|
356
356
|
console.error("自动录音开始失败:", error);
|
|
@@ -379,6 +379,8 @@ method:{
|
|
|
379
379
|
// 更新组件中的数据,页面会自动响应
|
|
380
380
|
this.recordingStatus = 'stopped';
|
|
381
381
|
this.audioUrl = data.fileUrl;
|
|
382
|
+
this.audioPath = data.filePath;
|
|
383
|
+
this.audioData = data.fileData;
|
|
382
384
|
},
|
|
383
385
|
},
|
|
384
386
|
mounted() {
|
|
@@ -390,9 +392,12 @@ mounted() {
|
|
|
390
392
|
|
|
391
393
|
`recordingOptions`: Object
|
|
392
394
|
|
|
393
|
-
| 属性 | 类型
|
|
394
|
-
|
|
395
|
-
| isAuto | boolean | false
|
|
395
|
+
| 属性 | 类型 | 默认值 | 必填 | 支持平台 | 说明 |
|
|
396
|
+
|-----------|---------|-------|-----|----------|---------------------------|
|
|
397
|
+
| isAuto | boolean | false | 否 | Yuntu | 是否开启自动录音。若为 true,则自动开始录音。 |
|
|
398
|
+
| silenceDelay | int | 3 | 否 | Yuntu | 延迟 n 秒后开始静音检测 |
|
|
399
|
+
| silenceStopSeconds | int | 4 | 否 | Yuntu | 连续 n 秒静音停止录音 |
|
|
400
|
+
| volumeThreshold | double | 40 | 否 | Yuntu | 音量阈值,单位为分贝 |
|
|
396
401
|
|
|
397
402
|
|
|
398
403
|
### 返回说明
|
package/demo/index.vue
CHANGED
|
@@ -162,7 +162,7 @@ export default {
|
|
|
162
162
|
this.recordingStatus = 'recording';
|
|
163
163
|
try {
|
|
164
164
|
// 传入 { auto: true } 表示启用自动录音
|
|
165
|
-
const result = await this.$lamboJsBridge.startRecording({ auto: true });
|
|
165
|
+
const result = await this.$lamboJsBridge.startRecording({ auto: true , silenceDelay: 1, silenceStopSeconds: 2, volumeThreshold: 60});
|
|
166
166
|
console.log("自动录音开始成功:", result);
|
|
167
167
|
} catch (error) {
|
|
168
168
|
console.error("自动录音开始失败:", error);
|