Skip to content

Commit

Permalink
Use required constraints instead of advanced ones
Browse files Browse the repository at this point in the history
  • Loading branch information
eehakkin committed Mar 29, 2023
1 parent b2854f0 commit a83a0cf
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -603,9 +603,7 @@ <h3>Examples</h3>
// Try to correct lighting.
const videoCapabilities = videoTrack.getCapabilities();
if ((videoCapabilities.lightingCorrection || []).includes(true)) {
await videoTrack.applyConstraints({
advanced: [{lightingCorrection: true}]
});
await videoTrack.applyConstraints({lightingCorrection: {exact: true}});
} else {
// Lighting correction is not supported by the platform or by the camera.
// Consider falling back to some other method.
Expand Down

0 comments on commit a83a0cf

Please sign in to comment.