navigator.mediaDevices.getDisplayMedia({
audio: false,
video: true
}).then(gotMedia).catch(function(e) {
console.log('getDisplayMedia() error: ', e);
});
Will cause a pop up like this
I can see in another question that using --auto-select-desktop-capture-source in a headless browser can fix the issue but how can implement it in the JavaScript section? I wish the screen capture automatically starts from the current tab without any popups to select which tab.
