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) {
|
||||
switch (request.request_type) {
|
||||
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_GENERATE_STREAM:
|
||||
case content::MEDIA_ENUMERATE_DEVICES:
|
||||
// Get the default devices for the request.
|
||||
CefMediaCaptureDevicesDispatcher::GetInstance()->
|
||||
GetDefaultDevices(CefContentBrowserClient::Get()->pref_service(),
|
||||
// Pick the desired device or fall back to the first available of the
|
||||
// given type.
|
||||
CefMediaCaptureDevicesDispatcher::GetInstance()->GetRequestedDevice(
|
||||
request.requested_audio_device_id,
|
||||
microphone_requested,
|
||||
false,
|
||||
&devices);
|
||||
|
||||
CefMediaCaptureDevicesDispatcher::GetInstance()->GetRequestedDevice(
|
||||
request.requested_video_device_id,
|
||||
false,
|
||||
webcam_requested,
|
||||
&devices);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue