Skip to content

Commit

Permalink
Reduce framerate
Browse files Browse the repository at this point in the history
  • Loading branch information
chenditc committed Dec 21, 2022
1 parent e11df26 commit 8562d78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PeriodicChecks/PeriodicFaceDetection.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ function PeriodicFaceDetection(props) {
facingMode: "user",
}
// Save bandwidth by reducing framerate
if (enableDetection && !showCameraPreview && navigator.mediaDevices.getSupportedConstraints) {
if (navigator.mediaDevices.getSupportedConstraints) {
const videoConstraintAbility = navigator.mediaDevices.getSupportedConstraints();
if (videoConstraintAbility.frameRate) {
videoConstraints["frameRate"] = { min: 0, ideal: 1, max: 2 }
Expand Down

0 comments on commit 8562d78

Please sign in to comment.