优化视频分辨率

This commit is contained in:
yj 2024-08-22 11:32:22 +08:00
parent 94482f9dae
commit f475ddb85a
5 changed files with 14 additions and 10 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 709 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -139,7 +139,7 @@ const JoinSetting = forwardRef((_props: any, ref: any) => {
})
}
if (msg) {
message.error('未检测到麦克风!')
message.error(msg)
return
}
const list = [...joinRoomSettingForm]

View File

@ -235,7 +235,13 @@ const agora = {
},
// 摄像头采集
startCameraCapture: async () => {
await rtcEngine.startCameraCapture(VideoSourceType.VideoSourceCamera, {})
await rtcEngine.startCameraCapture(VideoSourceType.VideoSourceCamera, {
format: {
width: 640,
height: 360,
fps: 15,
}
})
},
// 停止采集摄像头
stopCameraCapture: async () => {
@ -259,14 +265,12 @@ const agora = {
if (isComputerAudio) {
rtcEngine.enableLoopbackRecording(true)
}
let data = {};
if (isFluencyPriority) {
data = {
frameRate: 60,
dimensions: {
window: 3840,
height: 2160,
}
let data = {
frameRate: isFluencyPriority ? 30 : 15,
dimensions: {
window: 1920,
height: 1080,
}
}
if (