Hide share button on browsers that lack getDisplayMedia
Mobile browsers typically don't support screen sharing. Hide the start-sharing button entirely when navigator.mediaDevices.getDisplayMedia is not available. https://claude.ai/code/session_01ALSwS4S8EHiP81i2KMsb9Y
This commit is contained in:
parent
6ca45de838
commit
9bfb66de86
1 changed files with 3 additions and 2 deletions
|
|
@ -1004,8 +1004,9 @@
|
|||
// Update peer count
|
||||
peerCount.textContent = state.peers.size;
|
||||
|
||||
// Update sharing buttons
|
||||
startShareBtn.classList.toggle('hidden', state.isSharing);
|
||||
// Update sharing buttons (hide entirely if browser lacks getDisplayMedia)
|
||||
const canShare = !!navigator.mediaDevices?.getDisplayMedia;
|
||||
startShareBtn.classList.toggle('hidden', state.isSharing || !canShare);
|
||||
stopShareBtn.classList.toggle('hidden', !state.isSharing);
|
||||
|
||||
// Update screen list
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue