[*] 每日优化
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
/**
|
||||
* 音频默认配置
|
||||
* TODO:MediaStreamTrack.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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user