Bug 227794 - Reuse same document capture sources for getUserMedia calls
Summary: Reuse same document capture sources for getUserMedia calls
Status: RESOLVED DUPLICATE of bug 241548
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-07-08 06:53 PDT by youenn fablet
Modified: 2022-07-04 00:43 PDT (History)
10 users (show)

See Also:


Attachments
Patch (22.59 KB, patch)
2021-07-08 06:56 PDT, youenn fablet
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2021-07-08 06:53:20 PDT
Reuse same document capture sources for getUserMedia calls.
This will allow to use only one AVVideoCaptureSource per document.
And this will also reduce the amount of muting done on iOS when getUserMedia is called.
Comment 1 youenn fablet 2021-07-08 06:56:51 PDT
Created attachment 433130 [details]
Patch
Comment 2 Eric Carlson 2021-07-09 06:49:21 PDT
Comment on attachment 433130 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=433130&action=review

> Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp:560
> +        if (device.type() != CaptureDevice::DeviceType::Camera)

Is there any reason to not support `CaptureDevice::DeviceType::Screen` here as well?

> Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:273
> +                audioSource->applyConstraints(m_request.audioConstraints);

Won't this also reconfigure the existing track?

> Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:277
> +                videoSource->applyConstraints(m_request.videoConstraints);

Ditto.
Comment 3 Radar WebKit Bug Importer 2021-07-15 06:54:16 PDT
<rdar://problem/80629508>
Comment 4 youenn fablet 2022-07-04 00:43:34 PDT

*** This bug has been marked as a duplicate of bug 241548 ***