Promisified access to getUserMedia & vendor prefixes.
Include the promiseUserMedia.js file and you will get a promiseUserMedia
global. You can
fetch the library from bower (promise-user-media) or use npm (promise-user-media) & browserify.
<script src="http://getuser.media/promiseUserMedia.js"></script>
<script>
promiseUserMedia({
video: true,
audio: true,
}).then(function(localStream){
document.querySelector('#gum').src = window.URL.createObjectURL(localStream);
}).catch(function(error){
alert('getUserMedia: ' + error.name + "\n" + error.message);
});
</script>
MIT. Copyright (c) 2014 Jan Lelis.