Bug 227794

Summary: Reuse same document capture sources for getUserMedia calls
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: eric.carlson, ews-watchlist, glenn, hta, jer.noble, philipj, sergio, tommyw, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch ews-feeder: commit-queue-

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 ***