Method to programmatically prompt the user to select and grant permission to capture the contents of a display or portion thereof (such as a window or screen) as a MediaStream.
getDisplayMedia
provides access to video (and optionally audio) streams rendered on the user's device, allowing to capture part or all of a screen for streaming, recording, or sharing. It is used from Javascript running in a user's web browser.
Support varies from browser to browser. See MDN Browser Compat Data for up-to-date information.
getDisplayMedia
forms part of browser-resident WebRTC support (see webrtc). It can be used by itself without establishing WebRTC connections.
It can also be used in conjunction with MediaRecorder; see mediarecorder. It completes getUserMedia getusermedia that allows to capture streams from a camera or a microphone.
Further references: