The DisplayMediaStreamConstraints dictionary is used to specify whether or not to include video and/or audio tracks in the MediaStream to be returned by getDisplayMedia(), as well as what type of processing must be applied to the tracks. Processing information is specified using MediaTrackConstraints objects providing options which are applied to the track after the media data is received but before it is made available on the MediaStream.
Properties
audio- A Boolean or
MediaTrackConstraintsvalue; if a Boolean, this value simply indicates whether or not to include an audio track in theMediaStreamreturned bygetDisplayMedia(). If aMediaTrackConstraintsobject is provided here, an audio track is included in the stream, but the audio is processed to match the specified constraints after being retrieved from the hardware but before being added to theMediaStream. The default value isfalse. video- If
true(the default), the display contents are included in aMediaStreamTrackwithin the stream provided bygetDisplayMedia(). Optionally, aMediaTrackConstraintsobject may be given, providing options specifying processing to be performed on the video data before adding it to the stream. A value offalseis not permitted, and results in aTypeErrorbeing thrown.
Specifications
| Specification | Status | Comment |
|---|---|---|
| Unknown The definition of 'DisplayMediaStreamConstraints' in that specification. |
Unknown | Initial definition |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
No compatibility data found. Please contribute data for "api.DisplayMediaStreamConstraints" (depth: 1) to the MDN compatibility data repository.
