Screen captureLimited availability
The navigator.mediaDevices.getDisplayMedia() method asks the user to choose a screen or portion of a screen (such as a window) to capture as a media stream.
Not yet supported in all major browsers — check the table and provide a fallback.
Browser support
DesktopChrome
1–71Not supported
72+Supportedsince Jan 29, 2019
Current: 155Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154Firefox
1–32Not supported
33+Supportedsince Oct 14, 2014
Current: 157Safari
1–12.1Not supported
13+Supportedsince Sep 19, 2019
Current: 27MobileChrome Android
✕Not supportedup to 155
Current: 155Firefox Android
✕Not supportedup to 157
Current: 157Safari iOS
✕Not supportedup to 27
Current: 27How to use
Not supported in Chrome Android, Firefox Android, Safari iOS. Use feature detection below and provide a fallback (or a polyfill) for those browsers.
Example
Full syntax and examples are on MDN: CaptureController.
Feature detection
JS · check before using
if ("CaptureController" in globalThis) {
// CaptureController is available
} else {
// load a polyfill or use a fallback
}Sub-features
Support for each part of the feature (15). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| CaptureController | 109 | 109 | ✕ | ✕ | ✕ | ✕ | ✕ |
| CaptureController.CaptureController | 109 | 109 | ✕ | ✕ | ✕ | ✕ | ✕ |
| CaptureController.setFocusBehavior | 109 | 109 | ✕ | ✕ | ✕ | ✕ | ✕ |
| MediaDevices.getDisplayMedia | 72 | 79 | 33 | 13 | ✕ | ✕ | ✕ |
| MediaDevices.getDisplayMedia.audio_capture_support | 74 | 79 | ✕ | ✕ | ✕ | ✕ | ✕ |
| MediaDevices.getDisplayMedia.controller_option | 109 | 109 | ✕ | ✕ | ✕ | ✕ | ✕ |
| MediaDevices.getDisplayMedia.monitorTypeSurfaces_option | 119 | 119 | ✕ | ✕ | ✕ | ✕ | ✕ |
| MediaDevices.getDisplayMedia.selfBrowserSurface_option | 112 | 112 | ✕ | ✕ | ✕ | ✕ | ✕ |
| MediaDevices.getDisplayMedia.surfaceSwitching_option | 107 | 107 | ✕ | ✕ | ✕ | ✕ | ✕ |
| MediaDevices.getDisplayMedia.systemAudio_option | 105 | 105 | ✕ | ✕ | ✕ | ✕ | ✕ |
| MediaStreamTrack.applyConstraints.displaySurface_constraint | 107 | 107 | ✕ | 11.1 | 107 | ✕ | 11.3 |
| MediaStreamTrack.applyConstraints.logicalSurface_constraint | ✕ | ✕ | ✕ | 11.1 | ✕ | ✕ | 11.3 |
| MediaStreamTrack.applyConstraints.suppressLocalAudioPlayback_constraint | 109 | 109 | ✕ | ✕ | 109 | ✕ | ✕ |
| iframe.allow.display-capture | 94 | 94 | 74 | 13 | 94 | ✕ | ✕ |
| http.headers.Permissions-Policy.display-capture | 94 | 94 | ✕ | ✕ | 94 | ✕ | ✕ |