Reasonably normalization for navigator.getUserMedia. Inspired by Mike Taylr's gUM Shield
Compressed size: 480 bytes gzipped (778 bytes minified).
Download the production version or the development version.
In your web page:
<!-- You can optionally include Unprefix.js... -->
<!-- <script src="https://raw.github.com/rwldrn/unprefix.js/master/dist/unprefix.js.min.js"></script> -->
<script src="dist/navigator.getusermedia.min.js"></script>
<script>
navigator.getUserMedia({ video: true, audio: true }, function( raw, cooked ) {
// "raw" is the stream as it was received by the host API
// "cooked" is the normalized, URL.createObjectURL()-ified
});
</script>
- Opera 12.02
- Chrome (behind an about://flag)
- Firefox Nightly 18+
Style guide: idiomatic.js, Lint and test your code using grunt.
Also, please don't edit files in the "dist" subdirectory as they are generated via grunt. You'll find source code in the "src" subdirectory!
Copyright (c) 2012 Rick Waldron waldron.rick@gmail.com Licensed under the MIT license.