← Media & Capture
Screen Capture
Probing…Screen Capture is a web platform capability in the Media & Capture category. Capture a tab, window or the whole screen. Supported in Chromium 72+, Firefox 66+, and Safari 13+. Requires a secure context (HTTPS or localhost) and a user gesture such as a click or tap.
Secure contextUser gesture
Try it
Loading demo…
Code
const stream = await navigator.mediaDevices.getDisplayMedia({ video: true })
videoEl.srcObject = stream
// Detect when the user stops sharing from the browser UI
stream.getVideoTracks()[0].addEventListener('ended', () => {
console.log('screen share ended')
})Browser support
Chromium
72
Firefox
66
Safari
13
Frequently asked questions
Which browsers support Screen Capture?
Supported in Chromium 72+, Firefox 66+, and Safari 13+.
Does Screen Capture require HTTPS?
Yes. Screen Capture needs a secure context, so it only works over HTTPS (or on localhost during development).
What is Screen Capture used for?
Capture a tab, window or the whole screen.
Can I try Screen Capture in my browser?
Yes. shwcs.net runs a live Screen Capture demo that probes your current browser and lets you try the API. Everything runs locally — nothing is sent anywhere.