MDN self-hosted library · e01.org

Screen Capture API

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
captureStream =
  await navigator.mediaDevices.getDisplayMedia(displayMediaOptions);
html
<iframe allow="display-capture" src="/some-other-document.html">…</iframe>