MediaDevices: getDisplayMedia() method

Limited availability

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

The getDisplayMedia() method of the MediaDevices interface prompts the user to select and grant permission to capture the contents of a display or portion thereof (such as a window) as a MediaStream.

The resulting stream can then be recorded using the WebRTC session.

See Using the Screen Capture API for more details and an example.