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 { ErrorModal } from "./ErrorModal";
|
||||||
import { GroupCallInspector } from "./GroupCallInspector";
|
import { GroupCallInspector } from "./GroupCallInspector";
|
||||||
|
|
||||||
|
const canScreenshare = "getDisplayMedia" in navigator.mediaDevices;
|
||||||
|
|
||||||
function useLoadGroupCall(client, roomId) {
|
function useLoadGroupCall(client, roomId) {
|
||||||
const [state, setState] = useState({
|
const [state, setState] = useState({
|
||||||
loading: true,
|
loading: true,
|
||||||
|
|
@ -432,10 +434,12 @@ function InRoomView({
|
||||||
onClick={toggleLocalVideoMuted}
|
onClick={toggleLocalVideoMuted}
|
||||||
/>
|
/>
|
||||||
</DropdownButton>
|
</DropdownButton>
|
||||||
<ScreenshareButton
|
{canScreenshare && (
|
||||||
enabled={isScreensharing}
|
<ScreenshareButton
|
||||||
onClick={toggleScreensharing}
|
enabled={isScreensharing}
|
||||||
/>
|
onClick={toggleScreensharing}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
<HangupButton onClick={onLeave} />
|
<HangupButton onClick={onLeave} />
|
||||||
</div>
|
</div>
|
||||||
<GroupCallInspector
|
<GroupCallInspector
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue