mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Fix assertion when only video or audio capture is selected (issue #1802)
This commit is contained in:
@ -2286,17 +2286,20 @@ void CefBrowserHostImpl::RequestMediaAccessPermission(
|
|||||||
case content::MEDIA_ENUMERATE_DEVICES:
|
case content::MEDIA_ENUMERATE_DEVICES:
|
||||||
// Pick the desired device or fall back to the first available of the
|
// Pick the desired device or fall back to the first available of the
|
||||||
// given type.
|
// given type.
|
||||||
|
if (microphone_requested) {
|
||||||
CefMediaCaptureDevicesDispatcher::GetInstance()->GetRequestedDevice(
|
CefMediaCaptureDevicesDispatcher::GetInstance()->GetRequestedDevice(
|
||||||
request.requested_audio_device_id,
|
request.requested_audio_device_id,
|
||||||
microphone_requested,
|
true,
|
||||||
false,
|
false,
|
||||||
&devices);
|
&devices);
|
||||||
|
}
|
||||||
|
if (webcam_requested) {
|
||||||
CefMediaCaptureDevicesDispatcher::GetInstance()->GetRequestedDevice(
|
CefMediaCaptureDevicesDispatcher::GetInstance()->GetRequestedDevice(
|
||||||
request.requested_video_device_id,
|
request.requested_video_device_id,
|
||||||
false,
|
false,
|
||||||
webcam_requested,
|
true,
|
||||||
&devices);
|
&devices);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user