MediaTrackSettings: displaySurface property

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

The MediaTrackSettings dictionary's displaySurface property indicates the type of display surface being captured.

Value

The value of displaySurface is a string that comes from the DisplayCaptureSurfaceType enumerated type, and is one of the following:

browser

The stream's video track presents the entire contents of a single browser tab which the user selected during the getDisplayMedia() call.

monitor

The video track in the stream presents the complete contents of one or more of the user's screens. Any empty space (if the displays are of different dimensions) is filled with a backdrop chosen by the user agent.

window

The stream's video track presents the contents of a single window selected by the user. The window may be from any application, not necessarily just from within the user agent.

Not all user agents support all of these surface types.

Specifications

Specification
Screen Capture
# dom-mediatrackconstraintset-displaysurface

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
displaySurface constraint
Chrome – Full support
Chrome 107 (Release date: 2022-10-25)
footnote Full support
Edge – Full support
Edge 107 (Release date: 2022-10-27)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 93 (Release date: 2022-11-17)
footnote Full support
Safari – Full support
Safari 11.1 (Release date: 2018-04-12)
footnote Full support
Chrome Android – Full support
Chrome Android 107 (Release date: 2022-10-25)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 73 (Release date: 2023-01-17)
footnote Full support
Safari on iOS – Full support
Safari on iOS 11.3 (Release date: 2018-03-29)
footnote Full support
Samsung Internet – Full support
Samsung Internet 21 (Release date: 2023-05-19)
footnote Full support
WebView Android – Full support
WebView Android 107 (Release date: 2022-10-25)
footnote Full support
WebView on iOS – Full support
WebView on iOS 11.3 (Release date: 2018-03-29)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support

See also