Adding displaySurface does not provoke option restriction for the user before sharing his own screen.
I am trying to limit those options to only let the user select anything except browser tabs.
I tried setting displaySurface explicitly to 'monitor' and still all options being showed up.
async startCaptureMD() {
let captureStream = null;
var screen_constraints = {
video: {
cursor: "always",
displaySurface: "monitor"
}
};
try{
captureStream = await
navigator.mediaDevices.getDisplayMedia(screen_constraints);
}catch(err){
console.log(err.message, err.code);
}
return captureStream;
},
The expected result is to show 'Your Entire Screen' or 'Application Window' and not 'Chrome Tab'.