From 9bfb66de86f67df2396352d89ce5daaec3254839 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 9 Feb 2026 09:33:48 +0000 Subject: [PATCH] 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 --- lanshare/static/index.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lanshare/static/index.html b/lanshare/static/index.html index 3221900..9eb60e3 100644 --- a/lanshare/static/index.html +++ b/lanshare/static/index.html @@ -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