Revert "iOS "Share Screen": route to a screen-share meeting (remote-support on iPhone)"
This reverts commit eb685b42ca.
This commit is contained in:
@@ -6153,9 +6153,6 @@ async function onMeetMsg(e){
|
|||||||
if(_pendingJoinMic){ _pendingJoinMic=false; if(!meetMic){ try{ await toggleMic(); }catch(_){} } }
|
if(_pendingJoinMic){ _pendingJoinMic=false; if(!meetMic){ try{ await toggleMic(); }catch(_){} } }
|
||||||
if(_pendingJoinCam){ _pendingJoinCam=false; if(!meetCam){ try{ await toggleCam(); }catch(_){} } }
|
if(_pendingJoinCam){ _pendingJoinCam=false; if(!meetCam){ try{ await toggleCam(); }catch(_){} } }
|
||||||
refreshMeetPanel(); updateHostControls();
|
refreshMeetPanel(); updateHostControls();
|
||||||
// iOS "Share Screen" entry: auto-start the native screen broadcast now that we have a peerId + room, and
|
|
||||||
// surface the code so the user can hand it to whoever should watch.
|
|
||||||
if(_autoShareOnJoin){ _autoShareOnJoin=false; setTimeout(()=>{ try{ toggleScreen(); }catch(_){} if(meetRoom) toast('Share code '+meetRoom+' so others can watch your screen.'); }, 800); }
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// The room is gone (host ended it / code expired). Say so plainly instead of hanging on "Connecting…"
|
// The room is gone (host ended it / code expired). Say so plainly instead of hanging on "Connecting…"
|
||||||
@@ -6314,20 +6311,7 @@ const panels=document.querySelectorAll('.panel');
|
|||||||
const chatcol=document.getElementById('chatcol');
|
const chatcol=document.getElementById('chatcol');
|
||||||
let loaded={share:false,connect:false};
|
let loaded={share:false,connect:false};
|
||||||
function currentTab(){ const b=document.querySelector('.railbtn.active'); return b?b.dataset.tab:'chat'; }
|
function currentTab(){ const b=document.querySelector('.railbtn.active'); return b?b.dataset.tab:'chat'; }
|
||||||
let _autoShareOnJoin=false;
|
|
||||||
// iOS "Share Screen": WKWebView can't capture the P2P remote-support flow, so route it to a screen-share
|
|
||||||
// MEETING — the native ReplayKit path publishes into LiveKit, and a helper joins by code to watch (+ talk/chat).
|
|
||||||
// (Viewing a shared screen already works in the webview; only capture is blocked, so only the SHARE side moves.)
|
|
||||||
function startIosScreenShareMeeting(){
|
|
||||||
const NC=nativeCallPlugin();
|
|
||||||
if(!NC || typeof NC.startMeetingScreenShare!=='function'){ switchTab('meeting'); toast('Update the app to share your screen'); return; }
|
|
||||||
if(meetState==='call'){ switchTab('meeting'); toast('You’re already in a meeting — tap Share screen there.'); return; }
|
|
||||||
_autoShareOnJoin=true;
|
|
||||||
switchTab('meeting');
|
|
||||||
enterMeeting(null); // start an instant meeting; the auto-share fires once meeting-joined gives us a peerId
|
|
||||||
}
|
|
||||||
function switchTab(tab){
|
function switchTab(tab){
|
||||||
if(tab==='share' && SFU.on && bzIsIOS()){ startIosScreenShareMeeting(); return; } // iOS: screen-share via a meeting, not the P2P iframe
|
|
||||||
railBtns.forEach(b=>b.classList.toggle('active',b.dataset.tab===tab));
|
railBtns.forEach(b=>b.classList.toggle('active',b.dataset.tab===tab));
|
||||||
panels.forEach(p=>p.classList.toggle('active',p.dataset.panel===tab));
|
panels.forEach(p=>p.classList.toggle('active',p.dataset.panel===tab));
|
||||||
chatcol.classList.toggle('hidden', tab!=='chat');
|
chatcol.classList.toggle('hidden', tab!=='chat');
|
||||||
|
|||||||
Reference in New Issue
Block a user