I am working on a screen recorder application and wanted to see if it's possible to limit what options the user can pick to record?
Right now, I am calling navigator.mediaDevices.getDisplayMedia({})
which prompts the user to share either 1) Entire Screen, 2) Application Window or 3) Chrome Tab
However, I would like to limit the options to just which Chrome Tab. I thought the solution was to set the displaySurface: browser
value:
navigator.mediaDevices.getDisplayMedia({
video: {
mediaSource: "screen",
audio: true,
cursor: ["motion"],
displaySurface: "browser",
},
});
However, I am still being presented with the three options instead of just the tab. Does anyone know how I can limit which screens can be shared?
Thank you in advance!