navigator.mediaDevices.getDisplayMedia() is the secure-context, promise-based browser API that asks the user to share a screen, window, or browser tab; when the user accepts, it resolves to a MediaStream containing a video (and optionally audio) track of the selected display surface, ready for preview, recording, or WebRTC transmission.