Skip to content

Commit a8e07fd

Browse files
authored
Merge pull request #97 from will093/master
fix: Firefox Android mic has no device label.
2 parents 7e30b93 + 4e8028c commit a8e07fd

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

DetectRTC.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -795,19 +795,11 @@
795795
device.label = 'HTTPs is required to get label of this ' + device.kind + ' device.';
796796
}
797797
}
798-
} else {
799-
// Firefox on Android still returns empty label
800-
if (device.kind === 'videoinput' && !isWebsiteHasWebcamPermissions) {
801-
isWebsiteHasWebcamPermissions = true;
802-
}
803-
804-
if (device.kind === 'audioinput' && !isWebsiteHasMicrophonePermissions) {
805-
isWebsiteHasMicrophonePermissions = true;
806-
}
807798
}
808799

809800
if (device.kind === 'audioinput') {
810801
hasMicrophone = true;
802+
isWebsiteHasMicrophonePermissions = true;
811803

812804
if (audioInputDevices.indexOf(device) === -1) {
813805
audioInputDevices.push(device);
@@ -824,6 +816,7 @@
824816

825817
if (device.kind === 'videoinput') {
826818
hasWebcam = true;
819+
isWebsiteHasWebcamPermissions = true;
827820

828821
if (videoInputDevices.indexOf(device) === -1) {
829822
videoInputDevices.push(device);

0 commit comments

Comments
 (0)