优化视频分辨率

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) { if (msg) {
message.error('未检测到麦克风!') message.error(msg)
return return
} }
const list = [...joinRoomSettingForm] const list = [...joinRoomSettingForm]

View File

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