modernizr
Version:
Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.
20 lines (19 loc) • 523 B
JavaScript
/*!
{
"name": "getUserMedia",
"property": "getusermedia",
"caniuse": "stream",
"tags": ["webrtc"],
"authors": ["Eric Bidelman", "Masataka Yakura"],
"notes": [{
"name": "W3C Spec",
"href": "https://w3c.github.io/mediacapture-main/#dom-mediadevices-getusermedia"
}]
}
!*/
/* DOC
Detects support for the new Promise-based `getUserMedia` API.
*/
define(['Modernizr'], function (Modernizr) {
Modernizr.addTest('getUserMedia', 'mediaDevices' in navigator && 'getUserMedia' in navigator.mediaDevices);
});