Explore Bato Web Agency Webflow Certified Partner Profile Explore Bato Web Agency Webflow Certified Partner Profile

OverconstrainedError: Constraints could not be satisfied

Illustration without a description Illustration without a description

The browser could not satisfy one of the requested media constraints. Inspect error.constraint to identify the rejected requirement. A resolution, frame rate, facing mode or exact device ID may be valid on one device and unavailable on another.

 

Start with the basic video or audio request the feature needs. Where a quality setting is a preference, use a less restrictive constraint and inspect what the device can provide. Keep exact requirements only for settings without which the feature cannot operate.

 

try { await navigator.mediaDevices.getUserMedia({ video: { width: { exact: 3840 } } }); } catch (error) { if (error.name === 'OverconstrainedError') console.log(error.constraint); }

 

Test on the affected device with that constraint relaxed. If the request succeeds, check that the resulting stream still suits the feature before making the fallback automatic.

 

Read error.constraint from the rejection and retry the same device with a camera mode you know it supports.