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