This commit is contained in:
yj 2024-07-17 14:34:25 +08:00
parent b042e1b62d
commit 2190619732
1 changed files with 2 additions and 2 deletions

View File

@ -153,7 +153,7 @@ const agora = {
},
// 摄像头采集
setCameraCapture: (sourceType: number) => {
// agora.stopScreenCapture()
agora.stopScreenCapture()
if (sourceType !== option.sourceType) {
rtcEngine.destroyRendererByConfig(option.sourceType, option.channelId, option.account)
option.sourceType = sourceType
@ -179,7 +179,7 @@ const agora = {
// 共享屏幕采集
setDesktopCapturerVideo: async (targetSource: any, sourceType: number) => {
if (sourceType !== option.sourceType) {
// await rtcEngine.stopCameraCapture(option.sourceType)
await rtcEngine.stopCameraCapture(option.sourceType)
rtcEngine.destroyRendererByConfig(option.sourceType, option.channelId, option.account)
option.sourceType = sourceType
agora.setupLocalVideo({