Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

md-gum-polyfill

mozdevs5.5kMPL-2.01.0.0

A polyfill to use the Promise-flavoured, mediaDevices based version of getUserMedia, in browsers that support some sort of getUserMedia.

getUserMedia, streaming, polyfill

readme

mediaDevices-getUserMedia-polyfill

A polyfill to use the Promise-flavoured, mediaDevices based version of getUserMedia, in browsers that support some sort of getUserMedia.

With this polyfill you can access getUserMedia like this:

navigator.mediaDevices.getUserMedia({ video: true, audio: true }).then(function(stream) {

}, function(error) {

});

versus the old version:

navigator.getUserMedia({ video: true, audio: true }, function(stream) {

}, function(error) {

});

Look at index.html and main.js in the example folder to see how to use the result of the stream to display a video on screen when successful, or how to detect errors and showing a message to the user.

Here is a list of browser support for WebRTC / getUserMedia.