mirror of
https://github.com/eliasstepanik/vdo.ninja.git
synced 2026-01-11 13:48:38 +00:00
24 lines
482 B
HTML
24 lines
482 B
HTML
<html>
|
|
<head><meta charset="UTF-8"></head>
|
|
<body>
|
|
<script>
|
|
var list = [];
|
|
|
|
|
|
navigator.mediaDevices.enumerateDevices()
|
|
.then(function(devices) {
|
|
devices.forEach(function(device) {
|
|
console.log(device.kind + ": " + device.label +
|
|
" id = " + device.deviceId);
|
|
list.push(device);
|
|
});
|
|
document.write(JSON.stringify(list, null, 2));
|
|
})
|
|
.catch(function(err) {
|
|
console.log(err.name + ": " + err.message);
|
|
});
|
|
|
|
|
|
</script>
|
|
</body>
|
|
</html> |