Bug 146985

Summary: In getUserMedia(), make sure a request has titles of devices which user can choose from.
Product: WebKit Reporter: Matthew Daiter <mdaiter>
Component: WebCore Misc.Assignee: Matthew Daiter <mdaiter>
Status: RESOLVED INVALID    
Severity: Normal CC: bfulgham, eric.carlson, jeremyj-wk, jonlee, mdaiter, webkit-bug-importer, webkit.review.bot
Priority: P2 Keywords: InRadar, PlatformOnly
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch eric.carlson: review-

Description Matthew Daiter 2015-07-15 15:45:07 PDT
When presenting getUserMedia, the user should be informed of the device he or she is opening. This patch enables the passing of a list of strings from WebCore to WebKit2, enabling browsers to pull an available list of devices so a user can see options from which he or she can choose.
Comment 1 Radar WebKit Bug Importer 2015-07-15 15:46:29 PDT
<rdar://problem/21844415>
Comment 2 Matthew Daiter 2015-07-15 15:52:22 PDT
Created attachment 256871 [details]
Patch
Comment 3 Eric Carlson 2015-07-15 20:08:51 PDT
Comment on attachment 256871 [details]
Patch

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

> Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:127
>  void UserMediaRequest::constraintsValidated()
>  {

Is this necessary to get titles?

> Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:134
> +            Vector<RefPtr<TrackSourceInfo>> trackSourcesInfo = AVCaptureDeviceManager::singleton().getSourcesInfo("");

If so, this code is cross platform so I think you need to add a new virtual method to RealtimeMediaSourceCenter that calls [platform manager].getSourcesInfo()

> Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:138
> +                    AVCaptureDeviceManager::singleton().verifyConstraintsForMediaType(RealtimeMediaSource::Audio, protectedAudio.get(), invalidConstraint);

Ditto, but for verifyConstraintsForMediaType.

> Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:145
> +                    AVCaptureDeviceManager::singleton().verifyConstraintsForMediaType(RealtimeMediaSource::Video, protectedVideo.get(), invalidConstraint);

Ditto.
Comment 4 Jon Lee 2016-01-25 14:16:38 PST
This is handled elsewhere.