Only show screenshare button if you can screenshare
This commit is contained in:
parent
d53475662b
commit
12a1c35f80
1 changed files with 8 additions and 4 deletions
12
src/Room.jsx
12
src/Room.jsx
|
@ -40,6 +40,8 @@ import { fetchGroupCall } from "./ConferenceCallManagerHooks";
|
|||
import { ErrorModal } from "./ErrorModal";
|
||||
import { GroupCallInspector } from "./GroupCallInspector";
|
||||
|
||||
const canScreenshare = "getDisplayMedia" in navigator.mediaDevices;
|
||||
|
||||
function useLoadGroupCall(client, roomId) {
|
||||
const [state, setState] = useState({
|
||||
loading: true,
|
||||
|
@ -432,10 +434,12 @@ function InRoomView({
|
|||
onClick={toggleLocalVideoMuted}
|
||||
/>
|
||||
</DropdownButton>
|
||||
<ScreenshareButton
|
||||
enabled={isScreensharing}
|
||||
onClick={toggleScreensharing}
|
||||
/>
|
||||
{canScreenshare && (
|
||||
<ScreenshareButton
|
||||
enabled={isScreensharing}
|
||||
onClick={toggleScreensharing}
|
||||
/>
|
||||
)}
|
||||
<HangupButton onClick={onLeave} />
|
||||
</div>
|
||||
<GroupCallInspector
|
||||
|
|
Loading…
Reference in a new issue