[*] 每日优化

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

View File

@@ -1539,6 +1539,7 @@ class Taoyao extends RemoteClient {
this.callbackError("无效房间");
return;
}
// TODO已经进入房间忽略
me.roomId = roomId;
const response = await me.request(
protocol.buildMessage("media::router::rtp::capabilities", {
@@ -1581,6 +1582,7 @@ class Taoyao extends RemoteClient {
if (clientId === me.clientId) {
// 忽略自己
} else {
// TODO已经存在忽略
me.remoteClients.set(clientId, new RemoteClient(status));
}
}
@@ -1634,6 +1636,7 @@ class Taoyao extends RemoteClient {
const me = this;
// 默认进入,如果需要确认使用回调函数重写。
const { roomId, password } = message.body;
// TODO已经进入房间拒绝
// if(me.roomId) {
// this.callbackError();
// return;