优化目录结构
This commit is contained in:
38
client/public/render-streaming/config.js
Normal file
38
client/public/render-streaming/config.js
Normal file
@@ -0,0 +1,38 @@
|
||||
import {getServers} from "./icesettings.js";
|
||||
|
||||
export async function getServerConfig() {
|
||||
const protocolEndPoint = location.origin + '/config';
|
||||
const createResponse = await fetch(protocolEndPoint);
|
||||
return await createResponse.json();
|
||||
}
|
||||
|
||||
export function getRTCConfiguration() {
|
||||
let config = {};
|
||||
config.sdpSemantics = 'unified-plan';
|
||||
config.iceServers = getServers();
|
||||
|
||||
// 添加音频处理选项,增强回声消除
|
||||
config.mediaConstraints = {
|
||||
audio: {
|
||||
echoCancellation: true,
|
||||
noiseSuppression: true,
|
||||
autoGainControl: true,
|
||||
highpassFilter: true,
|
||||
typingNoiseDetection: true
|
||||
}
|
||||
};
|
||||
|
||||
// 添加WebRTC音频处理选项
|
||||
config.rtcConfiguration = {
|
||||
'googEchoCancellation': true,
|
||||
'googEchoCancellation2': true,
|
||||
'googNoiseSuppression': true,
|
||||
'googNoiseSuppression2': true,
|
||||
'googAutoGainControl': true,
|
||||
'googAutoGainControl2': true,
|
||||
'googHighpassFilter': true,
|
||||
'googTypingNoiseDetection': true
|
||||
};
|
||||
|
||||
return config;
|
||||
}
|
||||
Reference in New Issue
Block a user