Support selection of WebRTC audio/video source (issue #1335).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2065 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
9dc7d2a398
commit
b43d26a4e5
|
@ -2370,22 +2370,20 @@ void CefBrowserHostImpl::RequestMediaAccessPermission(
|
||||||
if (microphone_requested || webcam_requested) {
|
if (microphone_requested || webcam_requested) {
|
||||||
switch (request.request_type) {
|
switch (request.request_type) {
|
||||||
case content::MEDIA_OPEN_DEVICE:
|
case content::MEDIA_OPEN_DEVICE:
|
||||||
// For open device request pick the desired device or fall back to the
|
|
||||||
// first available of the given type.
|
|
||||||
CefMediaCaptureDevicesDispatcher::GetInstance()->GetRequestedDevice(
|
|
||||||
(microphone_requested ? request.requested_audio_device_id :
|
|
||||||
request.requested_video_device_id),
|
|
||||||
microphone_requested,
|
|
||||||
webcam_requested,
|
|
||||||
&devices);
|
|
||||||
break;
|
|
||||||
case content::MEDIA_DEVICE_ACCESS:
|
case content::MEDIA_DEVICE_ACCESS:
|
||||||
case content::MEDIA_GENERATE_STREAM:
|
case content::MEDIA_GENERATE_STREAM:
|
||||||
case content::MEDIA_ENUMERATE_DEVICES:
|
case content::MEDIA_ENUMERATE_DEVICES:
|
||||||
// Get the default devices for the request.
|
// Pick the desired device or fall back to the first available of the
|
||||||
CefMediaCaptureDevicesDispatcher::GetInstance()->
|
// given type.
|
||||||
GetDefaultDevices(CefContentBrowserClient::Get()->pref_service(),
|
CefMediaCaptureDevicesDispatcher::GetInstance()->GetRequestedDevice(
|
||||||
|
request.requested_audio_device_id,
|
||||||
microphone_requested,
|
microphone_requested,
|
||||||
|
false,
|
||||||
|
&devices);
|
||||||
|
|
||||||
|
CefMediaCaptureDevicesDispatcher::GetInstance()->GetRequestedDevice(
|
||||||
|
request.requested_video_device_id,
|
||||||
|
false,
|
||||||
webcam_requested,
|
webcam_requested,
|
||||||
&devices);
|
&devices);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue