mirror of
https://github.com/beatriceo/polyglot.git
synced 2025-10-25 18:52:11 +00:00
asdf
This commit is contained in:
14
app/javascript/packs/local_video.js
Normal file
14
app/javascript/packs/local_video.js
Normal 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()";
|
||||
}
|
||||
Reference in New Issue
Block a user