> ## Content Index
> Fetch the complete content index at: https://blog.addpipe.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Standards Compliant Screen Capture in Chrome 70 With getDisplayMedia() (behind a flag)
- URL: https://blog.addpipe.com/screen-capture-in-chrome-70-with-getdisplaymedia/
- Published: 2018-11-23T18:22:31.000Z
- Updated: 2026-05-21T08:20:47.000Z
- Author: Octavian
- Tags: Technology, Screen Recording, getDisplayMedia, #Import 2026-05-22 13:18

**January 29th 2019 update: Chrome 72 was rolled out today with support for `navigator.MediaDevices.getDisplayMedia()` turned on by default. No need to change any flags. More details in the [Chrome 72 blog post](https://blog.addpipe.com/standards-compliant-screen-capture-in-chrome-72/).**

After [Edge](https://blogs.windows.com/msedgedev/2018/05/02/bringing-screen-capture-to-microsoft-edge-media-capture-api/), Chrome is the 2nd browser to add standards compliant screen capturing through `navigator.getDisplayMedia()`.

Its introduction in Chrome 70 has been [announced back in August](https://groups.google.com/forum/#!msg/discuss-webrtc/Uf0SrR4uxzk/uO8sLrWuEAAJ) and [further confirmed in October](https://groups.google.com/forum/#!msg/discuss-webrtc/6ImvPjWQvbE/AlCtGQnYBQAJ) on the [discuss-webrtc](https://groups.google.com/forum/#!forum/discuss-webrtc) Google group.

The feature is currently under a flag so after upgrading to Chrome 70 you have to go to **chrome://flags** and enable *Experimental Web Platform* first.

Once you do, head over to this [getDisplayMedia() demo](https://addpipe.com/get-display-media-demo/) and you’ll be able to record your screen in Chrome extension free.

Screen capture in Chrome was possible previously but [only through a separate extension](https://www.twilio.com/blog/2017/10/screen-capture-in-google-chrome.html) that one had to publish in the Chrome Web Store and users had to download. We’ve developed [such an extension](https://github.com/addpipe/Pipe-Screen-Recording-Chrome-Extension) back in February when we’ve explored screen recording through the [Pipe recorder](https://addpipe.com/).

Chrome 70 gives us a glimpse of the future.

To get access to a media stream of the screen in Chrome 70 you can now just use a few lines of code:

```javascript
navigator.getDisplayMedia({
    video: true
}).then(
    stream => {
        console.log("Awesome");
    },
    error => {
        console.log("Unable to acquire screen capture", error);
    });

```

You can run the code above in the dev console and you’ll be prompted to choose what you want to share. `getDisplayMedia()` doesn’t take any media constraints but in Chrome the user gets to choose whether to capture their entire screen, an app or just a Chrome window:

![The Chrome screen capture dialog with options for the entire screen, an application window or a Chrome tab.](https://blog.addpipe.com/content/images/2018/11/screen-capture-dialog-for-getDisplayMedia-in-Chrome-1024x843.jpg)

Once you get access to the screen stream you can just display it locally, share it with others in a WebRTC peer 2 peer call or you record it locally through the MediaStream Recorder API.

Here’s how to display the captured screen/application/Chrome tab in a `<video>` element in the web page:

```javascript
navigator.getDisplayMedia({
    video: true
}).then(
    stream => {
        //we have a stream, attach it to a feedback video element
        videoElement.srcObject = stream;
    },
    error => {
        console.log("Unable to acquire screen capture", error);
    });

```

Capturing audio together with the screen will also be implemented [as per this comment](https://bugs.chromium.org/p/chromium/issues/detail?id=326740#c105):

> We are planning to support audio capture in Chrome. Audio part was vague in the spec and and other browsers weren’t interested in supporting it, so we decided to roll with video support as the first step.

Microsoft [Edge was the 1st to support the standards compliant getDisplayMedia()](https://blogs.windows.com/msedgedev/2018/05/02/bringing-screen-capture-to-microsoft-edge-media-capture-api/) as part of the April 2018 update to Windows 10 and Edge (EdgeHTML engine version 17).

Firefox [will soon support getDisplayMedia() too](https://groups.google.com/forum/#!topic/mozilla.dev.platform/20EhEy%5FahKg). It’ll be introduced in Firefox ~~64 ([due in December](https://wiki.mozilla.org/Firefox/Roadmap/Updates)) or 65~~ 66 as per [the official bug report](https://bugzilla.mozilla.org/show%5Fbug.cgi?id=1321221).

Safari also plans on supporting the standard, if you’re interested in screen capture in Safari you can leave a comment and track progress in the [bug report](https://bugs.webkit.org/show%5Fbug.cgi?id=186294).

`getDisplayMedia()` [has recently been moved](https://github.com/w3c/mediacapture-screen-share/pull/86) [in the spec](https://w3c.github.io/mediacapture-screen-share/) from `navigator.getDisplayMedia()` to `navigator.MediaDevices.getDisplayMedia()` for consistency, so expect to use the new path when it’s released in production in Chrome 72.