3

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?

kaan_a
  • 3,503
  • 1
  • 28
  • 52

0 Answers0