Skip to content

Commit

Permalink
Bug 1528042 - Don't expose number of devices of a kind unless informa…
Browse files Browse the repository at this point in the history
…tion can be exposed for that kind per w3c/mediacapture-main#900. r=karlt

Differential Revision: https://phabricator.services.mozilla.com/D176925

UltraBlame original commit: 364f837033b89f56f75b4ec40d839fcdbd1693d8
  • Loading branch information
marco-c committed May 31, 2023
1 parent 82e9848 commit 954c95c
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 11 deletions.
8 changes: 2 additions & 6 deletions dom/media/MediaDevices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2099,9 +2099,7 @@ mRawGroupID
if
(
!
DeviceInformationCanBeExposed
(
)
mCanExposeMicrophoneInfo
&
&
!
Expand Down Expand Up @@ -2132,9 +2130,7 @@ continue
if
(
!
DeviceInformationCanBeExposed
(
)
mCanExposeCameraInfo
&
&
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -860,10 +860,10 @@
=
>
kind
!
=
=
"
audiooutput
videoinput
"
)
.
Expand All @@ -880,10 +880,10 @@
=
>
kind
!
=
=
"
audiooutput
videoinput
"
)
.
Expand All @@ -892,7 +892,59 @@
same
number
of
input
(
previously
exposed
)
videoinput
devices
"
)
;
assert_greater_than_equal
(
devices
.
filter
(
d
=
>
d
.
kind
=
=
"
audioinput
"
)
.
length
devices1
.
filter
(
d
=
>
d
.
kind
=
=
"
audioinput
"
)
.
length
"
same
number
or
more
audioinput
devices
"
)
Expand Down

0 comments on commit 954c95c

Please sign in to comment.