From 8ec0a44c09351d883b5417be5d5494ac736a35d4 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Sat, 8 May 2021 14:19:46 +0200 Subject: [PATCH] Fix controls for down streams. Now that down streams have labels, we need to distinguish on the stream direction. --- static/galene.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/galene.js b/static/galene.js index 4c02004..3aed4f8 100644 --- a/static/galene.js +++ b/static/galene.js @@ -1447,7 +1447,7 @@ function addCustomControls(media, container, c, toponly) { let volume = getVideoButton(controls, 'volume'); - if(c.label === 'camera') { + if(c.up && c.label === 'camera') { volume.remove(); } else { setVolumeButton(media.muted, @@ -1457,7 +1457,7 @@ function addCustomControls(media, container, c, toponly) { container.appendChild(controls); } - if(!document.getElementById('topcontrols-' + c.localId)) { + if(c.up && !document.getElementById('topcontrols-' + c.localId)) { let toptemplate = document.getElementById('topvideocontrols-template').firstElementChild; let topcontrols = cloneHTMLElement(toptemplate);