Error start video in preview screen: DOMException: Could not start video source and VideoNotStartedError

Description
I opened the preview screen on two browsers, Chrome and Edge (with two USB cameras, referred to as Cam 1 and Cam 2).

  • First, I accessed Chrome, and Cam 1 was displayed.
  • Then, I accessed Edge, but Cam 1 did not appear và countered an error. I tried switching to Cam 2 using switchCamera but encountered an error.

However, in Chrome, switching to Cam 2 using switchCamera worked fine.

When I exit the Chrome browser preview screen, the Edge browser camera works normally.

Browser Console Error
Error when Cam 1 did not appear in Edge: DOMException: Could not start video source
Error when switching to Cam 2 in Edge: {“stack”: “Error: VideoNotStartedError”, “message”: “VideoNotStartedError”}

Which Web Video SDK version?
1.11.6

To Reproduce(If applicable)
Steps to reproduce the behavior:

  1. Go to the preview screen on the Chrome browser, and Cam 1 works.
  2. Go to the preview screen on the Edge browser, and Cam 1 does not work.
  3. In the Edge browser, call the switchCamera function to switch to Cam 2, and Cam 2 does not work.
  4. In the Chrome browser, call the switchCamera function to switch to Cam 2, and Cam 2 works.

Device (please complete the following information):

  • Device: Windows
  • OS: Windows 10 Version 22H2
  • Browser: Chrome and Edge
  • Browser Version: Chrome version 126.0.6478.127 (Official Build (Official Build) (64-bit) and Edge version 126.0.2592.87 (Official build) (64-bit)

Hey @phuongnv1

Thanks for your feedback.

This might be related to a known limitation on Windows.

When Camera1 is already being used by another program (in this case, Chrome), attempting to use Camera1 to capture video will result in an error.

You will need to specify a different camera to start video manually.

If you can share the problematic Session ID to help us confirm the issue, that would be great.

Thanks
Vic