зеркало из https://github.com/electron/electron.git
fix: systemMediaPermissionDenied: should check for screen capture perms instead of camera
This commit is contained in:
Родитель
c41a28d7c8
Коммит
e9cc672165
|
@ -66,12 +66,22 @@ bool SystemMediaPermissionDenied(const content::MediaStreamRequest& request) {
|
||||||
system_media_permissions::SystemPermission::kDenied;
|
system_media_permissions::SystemPermission::kDenied;
|
||||||
}
|
}
|
||||||
if (request.video_type != MediaStreamType::NO_SERVICE) {
|
if (request.video_type != MediaStreamType::NO_SERVICE) {
|
||||||
const auto system_video_permission =
|
if (request.video_type == MediaStreamType::GUM_DESKTOP_VIDEO_CAPTURE ||
|
||||||
system_media_permissions::CheckSystemVideoCapturePermission();
|
request.video_type == MediaStreamType::GUM_TAB_VIDEO_CAPTURE) {
|
||||||
return system_video_permission ==
|
const auto system_screen_permission =
|
||||||
system_media_permissions::SystemPermission::kRestricted ||
|
system_media_permissions::CheckSystemScreenCapturePermission();
|
||||||
system_video_permission ==
|
return system_screen_permission ==
|
||||||
system_media_permissions::SystemPermission::kDenied;
|
system_media_permissions::SystemPermission::kRestricted ||
|
||||||
|
system_screen_permission ==
|
||||||
|
system_media_permissions::SystemPermission::kDenied;
|
||||||
|
} else {
|
||||||
|
const auto system_video_permission =
|
||||||
|
system_media_permissions::CheckSystemVideoCapturePermission();
|
||||||
|
return system_video_permission ==
|
||||||
|
system_media_permissions::SystemPermission::kRestricted ||
|
||||||
|
system_video_permission ==
|
||||||
|
system_media_permissions::SystemPermission::kDenied;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче