---
title: OverconstrainedError.constraint
slug: Web/API/OverconstrainedError/constraint
tags:
  - API
  - Audio
  - Media
  - Media Capture and Streams API
  - Media Streams API
  - OverconstrainedError
  - Property
  - Reference
  - Video
  - constraint
browser-compat: api.OverconstrainedError.constraint
---
{{securecontext_header}}{{APIRef("Media Capture and
  Streams")}}{{SeeCompatTable}}

The **`constraint`** read-only property of the
{{domxref("OverconstrainedError")}} interface returns the constraint that was supplied
in the constructor, meaning the constraint that was not satisfied.

## Syntax

```js
var constraint = Overconstrainederror.constraint;
```

### Value

A {{domxref('String')}}

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
