Skip to content

Ember addon providing cross browser access to getUserMedia

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

BryanCrotaz/ember-cli-userMedia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Ember addon providing cross browser access to getUserMedia

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published