Fix: clamp native tile height so shared screen never covers the controls
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 <noreply@anthropic.com>
This commit is contained in:
+11
-1
@@ -5391,14 +5391,24 @@ function bzNativeSyncTiles(){
|
|||||||
if(!meetNative) return;
|
if(!meetNative) return;
|
||||||
const NC=nativeCallPlugin(); if(!NC||!NC.syncVideoTiles) return;
|
const NC=nativeCallPlugin(); if(!NC||!NC.syncVideoTiles) return;
|
||||||
const tiles=[];
|
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=>{
|
document.querySelectorAll('#meetGrid .meet-tile').forEach(el=>{
|
||||||
const id=el.id ? el.id.replace('meet-tile-','') : ''; if(!id || id==='__waiting') return;
|
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;
|
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;
|
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; }
|
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
|
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;
|
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(_){}
|
try{ NC.syncVideoTiles({ tiles }); }catch(_){}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user