Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-125108

WebEngineView cannot list all video devices after disconnecting and reconnecting the device

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.5.7
    • 6.5.3, 6.6.3
    • WebEngine, WebView
    • None
    • macOS

    Description

      I have a mac computer with sonoma 14.4.1.

      The following behavior is observed. Two logitech c270 and c920-c web cameras are connected (same behavior when using two c270 cameras).

      • We connect two cameras.
      • Launch the application.
      • We get a list of cameras inside the js code inside WebEngineView using navigator.mediaDevices.enumerateDevices().
      • We initialize and receive video from one of the cameras from the resulting list.
      • Disable the second camera (disconnect the USB plug).
      • After a few seconds, insert the USB plug back into the same connector.
      • We are trying again to get a list of devices through the function navigator.mediaDevices.enumerateDevices(). As a result, the newly connected camera (the one that was disconnected) will not be in the resulting list.

      In the attached example, to repeat these steps you need:

      • Click "Fill Video devices".
      • Click "Init camera".
      • Wait for the image from the camera to appear.
      • Disconnect the second camera from the USB and connect it back after a few seconds.
      • Click the "Fill Video devices" button and make sure that the resulting list does not include a newly connected camera.

       

      In addition, the specified behavior is observed in examples from the WebRTC team (https://webrtc.github.io/samples/src/content/devices/input-output/)

      This example is also included in the source code in the archive (with minor changes that do not change the logic, but only adapt their code to run inside WebEngineView).

      To reproduce the problem:

      • Connect two USB cameras.
      • Launch the application and switch to the WebRTC team example tab.
      • We see the image from the camera.
      • Disconnect the second camera from USB and after a few seconds connect it back to the same port.
      • Click the "Reload Web" button and open the Video source drop-down list and see only one camera there (from which the image is currently being received).
      • You can press the "Reload Web" button several times and make sure that the camera does not appear.

      On Qt6.7.0 this problem is not observed.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt_webengine_team Qt WebEngine Team
            rumgot rumgot
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes