Skip to content

Commit

Permalink
fix(camera): add dual/triple rear cameras to blacklist (de+en) (#331)
Browse files Browse the repository at this point in the history
* format deviceBlackList with line breaks

* add new dual/triple cameras to deviceBlackList (de+en)
  • Loading branch information
dbakan authored Mar 28, 2023
1 parent 1f0b55b commit 75b537f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/misc/camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,20 @@ class Camera {
// media constraints don't allow us to specify which camera we want exactly.
const narrowDownFacingMode = async camera => {
// Filter some devices, known to be bad choices.
const deviceBlackList = ["OBS Virtual Camera", "OBS-Camera", "Desk View Camera", "Schreibtischansicht-Kamera", "Caméra Desk View", "Fotocamera di Panoramica Scrivania", "Rückseitige Ultra-Weitwinkelkamera", "Rückseitige Telefotokamera"];
const deviceBlackList = [
"OBS Virtual Camera",
"OBS-Camera",
"Desk View Camera",
"Schreibtischansicht-Kamera",
"Caméra Desk View",
"Fotocamera di Panoramica Scrivania",
"Rückseitige Ultra-Weitwinkelkamera",
"Rückseitige Telefotokamera",
"Rückseitige Dual-Weitwinkelkamera",
"Rückseitige Triple-Kamera",
"Back Dual Wide Camera",
"Back Triple Camera",
];

const devices = (await navigator.mediaDevices.enumerateDevices())
.filter(({ kind }) => kind === "videoinput")
Expand Down

0 comments on commit 75b537f

Please sign in to comment.