ember-cli-usermedia

4.0.2 • Public • Published

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

License

This project is licensed under the MIT License.

Readme

Keywords

Package Sidebar

Install

npm i ember-cli-usermedia

Weekly Downloads

2

Version

4.0.2

License

MIT

Unpacked Size

194 kB

Total Files

20

Last publish

Collaborators

  • bcrotaz
  • bgcrotaz
  • bryan.crotaz