diff --git a/static/galene.js b/static/galene.js index 3c7f75c..8bc5e2a 100644 --- a/static/galene.js +++ b/static/galene.js @@ -533,7 +533,9 @@ function setViewportHeight() { document.documentElement.style.setProperty( '--vh', `${window.innerHeight/100}px`, ); - showVideo(); + if (!getVisibility('left')) { + showVideo(); + } // Ajust video component size resizePeers(); } @@ -577,6 +579,16 @@ function setVisibility(id, visible) { elt.classList.add('invisible'); } +/** + * getVisibility tells whether specified element is visible. + * + * @param {string} id + */ +function getVisibility(id) { + let elt = document.getElementById(id); + return !elt.classList.contains('invisible'); +} + /** * Shows and hides various UI elements depending on the protocol state. */