--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/c59a82cb-9f76-402e-a2e4-34e70c8395ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
__________________________________________________________________________________________________________________________________________________________________
This communication & accompanying documents ("this e-mail") contains confidential and/or privileged information for exclusive use of the individual to whom it is addressed. If you are not the intended recipient, please immediately notify the company & delete this e-mail. Any unauthorized use or disclosure of this e-mail is strictly prohibited. Representations in this e-mail are subject to contract. As an e-mail user please be cautious of the technical & other vulnerabilities of the internet which may result in malicious and/or unauthorized access to / use / alteration of e-mails/e-mail IDs. Thank you.
_______________________________________________________________________________________________________________________________________________________________
--
var enumeratorPromise = navigator.mediaDevices.enumerateDevices().then(function(devices) {
var cam = devices.find(function(device) {
return device.kind === "videoinput";
});
var mic = devices.find(function(device) {
return device.kind === "audioinput";
});
var constraints = {video:cam && mediaConstraints.video, audio:mic && mediaConstraints.audio};
console.log("getUserMedia start mediaConstraints=" + JSON.stringify(constraints));
return navigator.mediaDevices.getUserMedia(constraints)
.then(function(stream) {
gotUserMedia(stream);
}).catch(function(err) {
console.log(err.name);
});
});