mirror of https://github.com/electron/electron
10 lines
320 B
HTML
10 lines
320 B
HTML
<script>
|
|
const {ipcRenderer} = require('electron')
|
|
navigator.mediaDevices.enumerateDevices().then((devices) => {
|
|
return devices.map((device) => device.deviceId)
|
|
.filter((deviceId) => deviceId !== "default")
|
|
}).then((deviceIds) => {
|
|
ipcRenderer.send('deviceIds', deviceIds)
|
|
})
|
|
</script>
|