# ember-cli-usermedia

> Easily use WebRTC in Ember.

Latest version **4.0.2** (published 2023-04-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install ember-cli-usermedia
pnpm add ember-cli-usermedia
yarn add ember-cli-usermedia
bun add ember-cli-usermedia
```

## 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 | 4.0.2 |
| Published | 2023-04-10 |
| First published | 2016-02-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 14.* \|\| 16.* \|\| >= 18 |
| Dependencies | 4 |
| Unpacked size | 189.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Bryan Crotaz |
| Maintainers | bcrotaz, bgcrotaz, bryan.crotaz |
| Keywords | ember-addon |

## Links

- npm: https://www.npmjs.com/package/ember-cli-usermedia
- Repository: https://github.com/BryanCrotaz/ember-cli-userMedia
- Homepage: https://github.com/BryanCrotaz/ember-cli-userMedia#readme
- Issues: https://github.com/BryanCrotaz/ember-cli-userMedia/issues
- npm.io page: https://npm.io/package/ember-cli-usermedia

## Dependencies (4)

- [ember-cli-babel](https://npm.io/package/ember-cli-babel.md) ^7.26.11
- [ember-concurrency](https://npm.io/package/ember-concurrency.md) ^3.0.0
- [ember-cli-htmlbars](https://npm.io/package/ember-cli-htmlbars.md) ^6.2.0
- [ember-cli-typescript](https://npm.io/package/ember-cli-typescript.md) ^5.2.1

## Recent versions

- 4.0.2 (latest) — 2023-04-10
- 4.0.1 — 2023-04-06
- 3.1.0 — 2019-11-06
- 3.0.2 — 2019-10-29
- 3.0.1 — 2019-06-22
- 3.0.0 — 2019-06-22
- 2.1.1 — 2018-08-05
- 2.1.0 — 2018-08-05
- 2.0.1 — 2018-06-28
- 2.0.0 — 2018-06-28
- 1.1.6 — 2017-03-02
- 1.1.5 — 2017-03-02
- 1.1.4 — 2017-02-06
- 1.1.3 — 2017-02-06
- 1.1.2 — 2017-02-06
- … 7 more at https://npm.io/package/ember-cli-usermedia/versions

## README

# ember-cli-usermedia

Ember addon providing cross browser access to getUserMedia


## Compatibility

* Ember.js v3.28 or above
* Ember CLI v3.28 or above
* Node.js v14 or above


## Installation

* `ember install ember-cli-usermedia`

## Usage

To get a simple HTML5 autoplay video element that grabs the webcam use
```
{{user-media-src}}
```

To capture either video or audio use `mediaConstraints`. The value should be a valid constraints object for getUserMedia. The minimum requirement is the default of `{ video: true, audio: false }`.

```
myConstraints: { video: true; audio: false; } // default

...

{{user-media-src mediaConstraints=myConstraints}}
```

To do something more sophisticated in markup, use the block form:

```
{{#user-media-src mediaConstraints=myConstraints as |media| }}
	<video class="webcam" autoplay=true src={{media.videoUrl}} />
	<!-- or -->
  <video class="webcam" autoplay=true srcObject={{media.videoStream}} />
{{/user-media-src}}
```

### Linting

* `npm run lint:js`
* `npm run lint:js -- --fix`

### Running tests

* `ember test` – Runs the test suite on the current Ember version
* `ember test --server` – Runs the test suite in "watch mode"
* `ember try:each` – Runs the test suite against multiple Ember versions

### Running the dummy application

* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).


## License

This project is licensed under the [MIT License](LICENSE.md).

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