To enable this feature in Chrome, toggle the Experimental Web Platform feature (See chrome://flags/#enable-experimental-web-platform-features).

Display the video stream from getDisplayMedia() in a video element.

The MediaStream object stream passed to the getDisplayMedia() callback is in global scope, so you can inspect it from the console.