[Webkit-unassigned] [Bug 179363] iOS calling getUserMedia() again kills video display of first getUserMedia()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 7 16:20:47 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=179363

Sean <selawre at twitch.tv> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |selawre at twitch.tv

--- Comment #33 from Sean <selawre at twitch.tv> ---
> If the new capture is using the same camera as the previous one, both will be able to continue in parallel.

I still get a black screen (after 3 secs) on the second call to getUserMedia() on iOS in this example where the same device is returned:

<!DOCTYPE html>
<html>
  <body>
    <div>
      <video id="video1" autoplay playsinline></video>
    </div>
    <script type="text/javascript">

      (async function () { 
        var constraints = {
          audio: false,
          video: true,
        };
        const result1 = await navigator.mediaDevices.getUserMedia(constraints).then(async function(stream) {
          var video1 = document.getElementById('video1');
          video1.srcObject = stream;
          return stream;
        });
        console.log(result1.getTracks()[0].getCapabilities().deviceId);

        window.setTimeout(async function () {
          const result2 = await navigator.mediaDevices.getUserMedia(constraints);
          console.log(result2.getTracks()[0].getCapabilities().deviceId);
      }, 3000);
      }());
    </script>
  </body>
</html>


Is this expected?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20221108/ce44b5b9/attachment.htm>


More information about the webkit-unassigned mailing list