This commit is contained in:
Beatrice Olivera
2018-08-31 15:49:10 +01:00
parent ebdad02216
commit d484769f40
3 changed files with 17 additions and 2 deletions

View File

@@ -0,0 +1,14 @@
const contactsVideo = document.getElementById("contacts-video")
try {
const contactsStream = navigator.mediaDevices.getUserMedia({
audio: false,
video: true
}).then(stream => {
contactsVideo.srcObject = stream;
contactsVideo.muted = true;
})
} catch(e) {
console.error(e);
contactsVideo.innerHTML = "Unable to getUserMedia()";
}