Agora Web SDK调用OBS虚拟摄像头而非笔记本原生摄像头的问题排查咨询
Why Agora Web Demo Is Using OBS Virtual Camera Instead of Native Laptop Camera
Hey there, let's break down why your Agora Web demo is prioritizing the OBS virtual camera over your laptop's native one, and walk through actionable fixes to resolve this:
Possible Reasons
- Browser Media Device Priority: Browsers typically prioritize the most recently used camera by default. If you’ve used the OBS virtual camera recently (either on this demo or another site), your browser might have set it as the go-to option.
- OBS Virtual Camera System Default: Some OBS configurations set the virtual camera as the system-wide default when activated. This overrides your laptop's native camera for all apps that access media devices, including the Agora Web demo.
- Cached Site Permissions: Your browser might have stored a previous permission grant for the Agora demo domain, locking it into using the OBS virtual camera without prompting you again.
Troubleshooting Steps
Adjust Browser's Default Camera Setting
- Open your browser’s settings (for Chrome: Settings > Privacy and security > Site settings > Camera; for Firefox: Settings > Privacy & Security > Permissions > Camera)
- Locate the "Default camera" dropdown menu. If it’s set to OBS Virtual Camera, switch it to your laptop’s native camera (usually labeled "Integrated Camera" or with your laptop brand name).
Reset Site-Specific Permissions for the Agora Demo
- On the Agora demo page, click the lock icon in your browser’s address bar.
- Select "Site settings" from the dropdown.
- Find the "Camera" permission, change it from "Allow (OBS Virtual Camera)" to "Ask".
- Refresh the demo page—you’ll now get a prompt to select your preferred camera; choose your native laptop camera.
Check OBS Virtual Camera Configuration
- If OBS is running, go to
Tools > Virtual Camerain the OBS menu. Look for any option that sets the virtual camera as the system default, and uncheck it if enabled. - Close OBS entirely, then reload the Agora demo to see if it now picks up your native camera.
- If OBS is running, go to
Test in Incognito/Private Mode
- Open the Agora demo in an incognito window. This mode bypasses cached permissions and browser settings. If the native camera works here, the issue is definitely tied to your main browser’s cached preferences.
Verify Detected Devices via Browser Console
- On the demo page, open your browser’s developer console (press
F12orCtrl+Shift+I). - Run this command to list all available media devices:
navigator.mediaDevices.enumerateDevices().then(devices => console.table(devices)) - Look for entries with
kind: "videoinput"—you should see both your native camera and the OBS virtual camera listed. This confirms both are detected, and helps you verify if the browser is recognizing your native camera correctly.
- On the demo page, open your browser’s developer console (press
After working through these steps, the Agora demo should default to your laptop’s native camera unless you explicitly select the OBS virtual camera again. If you run into any stuck points, feel free to share more details about your browser version or OBS setup!
内容的提问来源于stack exchange,提问作者wontone_boys
相关产品推荐
相关产品推荐

