# [getUserMedia Adatper](https://github.com/muaz-khan/gumadapter)
Copyrights goes to:
* https://github.com/webrtc/adapter/blob/master/LICENSE.md
[](https://npmjs.org/package/gumadapter) [](https://npmjs.org/package/gumadapter)
> `navigator.getUserMedi` is upgraded into promises based API: `navigator.mediaDevices.getUserMedia`.
>
> This shim/polyfill merely helps handling cross-browser issues.
# Check all releases:
* https://github.com/muaz-khan/gumadapter/releases
## How to link?
```html
```
It is suggested to link specific release:
* https://github.com/muaz-khan/gumadapter/releases
E.g.
```html
```
# How to use?
```javascript
function successCallback(stream) {
video.srcObject = stream;
}
function errorCallback(error) {
// maybe another application is using the device
}
var mediaConstraints = { video: true, audio: true };
navigator.mediaDevices.getUserMedia(mediaConstraints).then(successCallback).catch(errorCallback);
```