# enumerate-devices

> A small project to normalize browser differences for enumerating media devices

Latest version **1.1.1** (published 2017-06-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install enumerate-devices
pnpm add enumerate-devices
yarn add enumerate-devices
bun add enumerate-devices
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2017-06-06 |
| First published | 2015-10-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Xander Dumaine |
| Maintainers | xdumaine |
| Keywords | webrtc, getUserMedia, getMediaDevices, getSources, enumerateDevices, MediaStreamTrack |

## Links

- npm: https://www.npmjs.com/package/enumerate-devices
- Repository: https://github.com/xdumaine/enumerateDevices
- Homepage: https://github.com/xdumaine/enumerateDevices#readme
- Issues: https://github.com/xdumaine/enumerateDevices/issues
- npm.io page: https://npm.io/package/enumerate-devices

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2017-06-06
- 1.1.0 — 2016-05-24
- 1.0.0 — 2015-10-05

## README

####What
This is a simple module for normalizing the differences in enumerating media devices in webkit (Chrome/Opera) and Mozilla (Firefox).

####Why
Because the usages and results of the two implementations differ, and it's nice to normalize the behavior and results.

####How

```javascript
//promises!
const enumerateDevices = require('enumerate-devices');

enumerateDevices().then((devices) => console.log(devices)).catch(console.log.bind(console));

//or callbacks!

var enumerateDevices = require('enumerate-devices');

enumerateDevices(function(err, devices) {
    if(err) {
        console.log(err.message); //device enumeration not supported
    } else {
        console.log(devices);
    }
});
```

Test by running `npm start` and visiting [http://localhost:8880/test](http://localhost:8880/test/)

####Demo

View a demo of the module in use on [the test page](https://xdumaine.github.io/enumerateDevices/test/).

####Who

[@xanderdumaine](https://twitter.com/xanderdumaine)

---
_Source: https://npm.io/package/enumerate-devices · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
