Reputation: 4047
One can retrieve a stream of the users display using navigator.mediaDevices.getDisplayMedia
. On some browsers I can also preselect the entire screens tab like so:
const stream = await navigator.mediaDevices.getDisplayMedia({
// Pre-select the "Entire Screen" pane in the media picker.
video: { displaySurface: "monitor" },
});
However the user is still free to pick any tab, window or screen they choose. Is there a way to find out what the user picked?
Upvotes: 4
Views: 260