1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-22 16:45:58 +01:00

Fix replacing of a video with a new one.

This was broken when we implemented local videos.
This commit is contained in:
Juliusz Chroboczek 2020-12-01 16:20:25 +01:00
parent 2b19a1034f
commit e68882fff0

View file

@ -1050,7 +1050,6 @@ function setMedia(c, isUp, video) {
media = document.createElement('video'); media = document.createElement('video');
if(isUp) if(isUp)
media.muted = true; media.muted = true;
media.srcObject = c.stream;
} }
media.classList.add('media'); media.classList.add('media');
@ -1063,6 +1062,9 @@ function setMedia(c, isUp, video) {
addCustomControls(media, div, c); addCustomControls(media, div, c);
} }
if(!video)
media.srcObject = c.stream;
let label = document.getElementById('label-' + c.id); let label = document.getElementById('label-' + c.id);
if(!label) { if(!label) {
label = document.createElement('div'); label = document.createElement('div');