13 lines
469 B
JavaScript
13 lines
469 B
JavaScript
const { app, BrowserWindow } = require('electron');
|
|
app.whenReady().then(() => {
|
|
const win = new BrowserWindow({ show: false });
|
|
win.webContents.executeJavaScript(`
|
|
navigator.mediaDevices.getUserMedia({audio:true}).then(() =>
|
|
navigator.mediaDevices.enumerateDevices()
|
|
).then(devices => devices.map(d => d.label))
|
|
`).then(labels => {
|
|
console.log("LABELS:", labels.filter(l => l.toLowerCase().includes('screenshare')));
|
|
app.quit();
|
|
});
|
|
});
|