electron/spec/fixtures/pages/media-id-reset.html

10 lines
320 B
HTML
Raw Normal View History

2016-12-03 18:52:57 +00:00
<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>