From 5a140e45a1cd117f5cc1002c8a9035454330857d Mon Sep 17 00:00:00 2001 From: sravan Date: Fri, 7 Aug 2026 10:51:32 +0530 Subject: [PATCH] Fix: clamp native tile height so shared screen never covers the controls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The CSS-only stage sizing wasn't enough — the shared screen still overlapped the meeting controls. Since the native video is drawn ON TOP of the WebView, now clamp each tile's height in bzNativeSyncTiles so it can never extend past the top of the .meet-bar (control bar) — regardless of how the web lays out the stage. Robust and web-only. Co-Authored-By: Claude Opus 4.8 --- server/public/home.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/server/public/home.html b/server/public/home.html index 10e342c..8faca6e 100644 --- a/server/public/home.html +++ b/server/public/home.html @@ -5391,14 +5391,24 @@ function bzNativeSyncTiles(){ if(!meetNative) return; const NC=nativeCallPlugin(); if(!NC||!NC.syncVideoTiles) return; const tiles=[]; + // Native views draw ON TOP of the WebView, so a full-height tile would cover the control bar. Never let a + // tile's native video extend past the top of the meeting controls (or, in normal grid mode, below the grid). + const bar=document.querySelector('#meetGrid ~ .meet-bar') || document.querySelector('.meet-bar'); + const gridEl=document.getElementById('meetGrid'); + let maxBottom=Infinity; + if(bar){ const br=bar.getBoundingClientRect(); if(br.height>0) maxBottom=br.top; } + else if(gridEl){ const gr=gridEl.getBoundingClientRect(); if(gr.height>0) maxBottom=gr.bottom; } document.querySelectorAll('#meetGrid .meet-tile').forEach(el=>{ const id=el.id ? el.id.replace('meet-tile-','') : ''; if(!id || id==='__waiting') return; const r=el.getBoundingClientRect(); if(r.width<2||r.height<2) return; + let h=r.height; + if(r.top < maxBottom && (r.top + h) > maxBottom) h = maxBottom - r.top; // clamp so it never covers the controls + if(h<2) return; let uid, local=false, name='', muted=false, screen=false; if(id==='__local'){ uid=(ME&&ME.id)||''; local=true; name=(ME&&ME.name)||'You'; muted=!meetMic; } else { uid=meetPeerUids.get(id)||''; name=meetNames.get(id)||'Guest'; muted=!!meetMuted.get(id); screen=meetSharers.has(id); } // sharer's tile → render their screen, not camera if(!uid) return; - tiles.push({ uid, local, name, muted, screen, x:r.left, y:r.top, w:r.width, h:r.height }); + tiles.push({ uid, local, name, muted, screen, x:r.left, y:r.top, w:r.width, h }); }); try{ NC.syncVideoTiles({ tiles }); }catch(_){} }