Bug 146985 - In getUserMedia(), make sure a request has titles of devices which user can choose from.
Summary: In getUserMedia(), make sure a request has titles of devices which user can c...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Matthew Daiter
URL:
Keywords: InRadar, PlatformOnly
Depends on:
Blocks:
 
Reported: 2015-07-15 15:45 PDT by Matthew Daiter
Modified: 2016-01-25 14:16 PST (History)
7 users (show)

See Also:


Attachments
Patch (4.23 KB, patch)
2015-07-15 15:52 PDT, Matthew Daiter
eric.carlson: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.