[*] 每日优化

This commit is contained in:
acgist
2023-05-14 09:56:32 +08:00
parent 8430fa78a8
commit 9db40b629d
15 changed files with 85 additions and 44 deletions

View File

@@ -1,16 +1,17 @@
/**
* 音频默认配置
* TODOMediaStreamTrack.applyConstraints()
* 播放音量、采集音量
* TODO播放音量audio标签配置、采集音量
* 支持属性navigator.mediaDevices.getSupportedConstraints()
* https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackSettings
*/
const defaultAudioConfig = {
// 设备
// deviceId : '',
// 音量0~1
volume: 1.0,
// 延迟大小(单位500毫秒以内较好
latency: 0.4,
// 音量废弃0.0~1.0
// volume: 1.0,
// 延迟时间(单位500毫秒以内较好
// latency: 0.4,
// 采样位数8|16|32
sampleSize: { min: 8, ideal: 16, max: 32 },
// 采样率8000|16000|32000|48000
@@ -18,7 +19,7 @@ const defaultAudioConfig = {
// 声道数量1|2
channelCount: 1,
// 是否开启自动增益true|false
autoGainControl: false,
autoGainControl: true,
// 是否开启降噪功能true|false
noiseSuppression: true,
// 是否开启回音消除true|false