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.
<rdar://problem/21844415>
Created attachment 256871 [details] Patch
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.
This is handled elsewhere.