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

@ -73,7 +73,7 @@ a:hover {
.video-content { .video-content {
height: 485px; height: 485px;
background-color: black; // background-color: black;
} }
.half { .half {

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()";
}

View File

@ -15,7 +15,7 @@
</div> </div>
<div class="video-feed half"> <div class="video-feed half">
<div class="video-content"> <div class="video-content">
<!-- <video id="contacts-video" autoplay=""></video> --> <video id="contacts-video" autoplay=""></video>
</div> </div>
</div> </div>
</div> </div>
@ -29,5 +29,6 @@
</form> </form>
<%= javascript_pack_tag 'notifications' %> <%= javascript_pack_tag 'notifications' %>
<%= javascript_pack_tag 'local_video' %>