fix: systemMediaPermissionDenied should not check camera perms when the request is asking for screen share (#43543)
* fix: systemMediaPermissionDenied: should check for screen capture perms instead of camera Co-authored-by: George Xu <george.xu@slack-corp.com> * Revert "fix: systemMediaPermissionDenied: should check for screen capture perms instead of camera" This reverts commit e9cc67216558263402867056ed332f8781da3153. Co-authored-by: George Xu <george.xu@slack-corp.com> * should only do these checks for audio or video, but not screenshare Co-authored-by: George Xu <george.xu@slack-corp.com> * no service Co-authored-by: George Xu <george.xu@slack-corp.com> * oops Co-authored-by: George Xu <george.xu@slack-corp.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: George Xu <george.xu@slack-corp.com>
This commit is contained in:
parent
40316df338
commit
5d340577b6
1 changed files with 3 additions and 2 deletions
|
@ -57,7 +57,7 @@ namespace {
|
|||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
bool SystemMediaPermissionDenied(const content::MediaStreamRequest& request) {
|
||||
if (request.audio_type != MediaStreamType::NO_SERVICE) {
|
||||
if (request.audio_type == MediaStreamType::DEVICE_AUDIO_CAPTURE) {
|
||||
const auto system_audio_permission =
|
||||
system_media_permissions::CheckSystemAudioCapturePermission();
|
||||
return system_audio_permission ==
|
||||
|
@ -65,7 +65,7 @@ bool SystemMediaPermissionDenied(const content::MediaStreamRequest& request) {
|
|||
system_audio_permission ==
|
||||
system_media_permissions::SystemPermission::kDenied;
|
||||
}
|
||||
if (request.video_type != MediaStreamType::NO_SERVICE) {
|
||||
if (request.video_type == MediaStreamType::DEVICE_VIDEO_CAPTURE) {
|
||||
const auto system_video_permission =
|
||||
system_media_permissions::CheckSystemVideoCapturePermission();
|
||||
return system_video_permission ==
|
||||
|
@ -73,6 +73,7 @@ bool SystemMediaPermissionDenied(const content::MediaStreamRequest& request) {
|
|||
system_video_permission ==
|
||||
system_media_permissions::SystemPermission::kDenied;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue