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