Package Exports
- win10-find-all-video-capture-devices
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (win10-find-all-video-capture-devices) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
win10-find-all-video-capture-devices
Find all video capture devices on Windows 10.
This module is a wrapper around the DeviceInformation.findAllAsync method from the Windows.Devices.Enumeration namespace of the Universal Windows Platform API.
Thanks to NodeRT, this module comes prebuilt for Windows 10.
Installation
npm install win10-find-all-video-capture-devicesQuickstart
const isWin10 = require('is-win10')
const findAllVideoCaptureDevices = require('win10-find-all-video-capture-devices')
if (isWin10) {
findAllVideoCaptureDevices().then(devices => {
devices.forEach(device => {
console.log(device)
/* {
* enclosureLocation: {
* inDock: false,
* inLid: true,
* panel: 'front',
* rotationAngleInDegreesClockwise: 0
* },
* id: '{{id}}',
* isDefault: false,
* isEnabled: true,
* kind: 'deviceInterface',
* name: '{{name}}',
* pairing: {
* canPair: false,
* isPaired: false,
* protectionLevel: 'none'
* }
* }
*/
})
})
}API
findAllVideoCaptureDevices()
- returns a
<Promise>which:- resolves with an
<Array>of video capture devices - rejects with an
<Error>- if used on a non-Windows 10 system
- if finding the devices failed
- resolves with an
For more documentation, check out the code comments, or consult the official UWP Windows.Devices.Enumeration documentation.
License
WTFPL – Do What the F*ck You Want to Public License.
Made with ❤️ by @MarkTiedemann.